sisinflab-swot / cowl

🦉 A lightweight C/C++ library for working with Web Ontology Language (OWL) ontologies
http://swot.sisinflab.poliba.it/cowl
Eclipse Public License 2.0
33 stars 4 forks source link

Compile Warning #4

Closed MicroHimalaya closed 3 years ago

MicroHimalaya commented 3 years ago

Hello, When I Compile COWL used in my project

Warning Information Flowing:

In file included from src/cowl/src/cowl_axiom_private.h:17:0, from src/cowl/src/cowl_annot_assert_axiom_private.h:15, from src/cowl/src/include/cowl_private.h:15, from build/release64/src/cowl/src/cowl_logger.c:12: build/release64/src/cowl/src/cowl_logger.c: In function 'cowl_logger_release': src/cowl/src/cowl_object_private.h:40:60: warning: right-hand operand of comma expression has no effect [-Wunused-value] (cowl_object_flags_decr_ref(((CowlObject *)(o))->flags), cowl_object_get_ref(o)) ^ build/release64/src/cowl/src/cowl_logger.c:201:9: note: in expansion of macro 'cowl_object_decr_ref' cowl_object_decr_ref(logger); ^

IvanoBilenchi commented 3 years ago

Thanks for reporting this.

I assume you are compiling via GCC, as Clang does not seem to issue any warning. I seldom use GCC in my workflow, so this one slipped by unnoticed. Anyway, I fixed all GCC warnings in 0e4a861 (tested with GCC 11.2.0), which will be part of release v0.5.1.