From 712154704964906a59d481dc7edf43554f9eaf83 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 18 Jan 2011 17:48:22 +0100 Subject: Fix build with NDEBUG defined The usage of the gcc option -Wunused-parameter interferes badly with the assert() macros. In case -DNDEBUG is specified build fails with: cc1: warnings being treated as errors print.c: In function 'ipset_print_family': print.c:92: error: unused parameter 'opt' print.c: In function 'ipset_print_port': print.c:413: error: unused parameter 'opt' print.c: In function 'ipset_print_proto': Fix it by taking into accout NDEBUG in the function arguments. Bug reported by Holger Eitzenberger. --- lib/parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/parse.c') diff --git a/lib/parse.c b/lib/parse.c index fbc1dca..e998df5 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -845,7 +845,7 @@ ipset_parse_net(struct ipset_session *session, */ int ipset_parse_range(struct ipset_session *session, - enum ipset_opt opt, const char *str) + enum ipset_opt opt ASSERT_UNUSED, const char *str) { assert(session); assert(opt == IPSET_OPT_IP || opt == IPSET_OPT_IP2); @@ -1322,7 +1322,7 @@ ipset_parse_flag(struct ipset_session *session, */ int ipset_parse_typename(struct ipset_session *session, - enum ipset_opt opt, const char *str) + enum ipset_opt opt ASSERT_UNUSED, const char *str) { const struct ipset_type *type; const char *typename; -- cgit v1.2.3