From patchwork Thu Nov 24 10:08:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 1708608 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NHtws4bkVz23mg for ; Thu, 24 Nov 2022 21:08:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbiKXKIK (ORCPT ); Thu, 24 Nov 2022 05:08:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229798AbiKXKIK (ORCPT ); Thu, 24 Nov 2022 05:08:10 -0500 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C4F122C665 for ; Thu, 24 Nov 2022 02:08:08 -0800 (PST) From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH conntrackd 1/3] build: don't suppress various warnings Date: Thu, 24 Nov 2022 11:08:02 +0100 Message-Id: <20221124100804.25674-1-pablo@netfilter.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Sam James These will become fatal with Clang 16 and GCC 14 anyway, but let's address the real problem (followup commit). We do have to keep one wrt yyerror() & const char * though, but the issue is contained to the code Bison generates. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1637 Signed-off-by: Sam James Signed-off-by: Pablo Neira Ayuso --- posted via https://bugzilla.netfilter.org/show_bug.cgi?id=1637 src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index a1a91a0c8df6..2986ab3b4d4f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -61,7 +61,7 @@ conntrackd_SOURCES += systemd.c endif # yacc and lex generate dirty code -read_config_yy.o read_config_lex.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls -Wno-sign-compare +read_config_yy.o read_config_lex.o: AM_CFLAGS += -Wno-incompatible-pointer-types -Wno-discarded-qualifiers conntrackd_LDADD = ${LIBMNL_LIBS} ${LIBNETFILTER_CONNTRACK_LIBS} \ ${libdl_LIBS} ${LIBNFNETLINK_LIBS} From patchwork Thu Nov 24 10:08:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 1708609 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NHtws73s1z23nR for ; Thu, 24 Nov 2022 21:08:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbiKXKIL (ORCPT ); Thu, 24 Nov 2022 05:08:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiKXKIL (ORCPT ); Thu, 24 Nov 2022 05:08:11 -0500 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB3A72C665 for ; Thu, 24 Nov 2022 02:08:10 -0800 (PST) From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH conntrackd 2/3] network: Fix -Wstrict-prototypes Date: Thu, 24 Nov 2022 11:08:03 +0100 Message-Id: <20221124100804.25674-2-pablo@netfilter.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221124100804.25674-1-pablo@netfilter.org> References: <20221124100804.25674-1-pablo@netfilter.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Sam James Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1637 Signed-off-by: Sam James Signed-off-by: Pablo Neira Ayuso --- posted via https://bugzilla.netfilter.org/show_bug.cgi?id=1637 src/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 13db37c96bb0..2560d97bab06 100644 --- a/src/network.c +++ b/src/network.c @@ -113,7 +113,7 @@ void nethdr_track_update_seq(uint32_t seq) STATE_SYNC(last_seq_recv) = seq; } -int nethdr_track_is_seq_set() +int nethdr_track_is_seq_set(void) { return local_seq_set; } From patchwork Thu Nov 24 10:08:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 1708610 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4NHtwt2h3Kz23nT for ; Thu, 24 Nov 2022 21:08:14 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbiKXKIN (ORCPT ); Thu, 24 Nov 2022 05:08:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiKXKIM (ORCPT ); Thu, 24 Nov 2022 05:08:12 -0500 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5926531222 for ; Thu, 24 Nov 2022 02:08:11 -0800 (PST) From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH conntrackd 3/3] Fix -Wimplicit-function-declaration Date: Thu, 24 Nov 2022 11:08:04 +0100 Message-Id: <20221124100804.25674-3-pablo@netfilter.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221124100804.25674-1-pablo@netfilter.org> References: <20221124100804.25674-1-pablo@netfilter.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Sam James read_config_yy.c: In function ‘yyparse’: read_config_yy.c:1765:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration] 1765 | yychar = yylex (); | ^~~~~ read_config_yy.c:1765:16: warning: nested extern declaration of ‘yylex’ [-Wnested-externs] read_config_yy.y:120:17: warning: implicit declaration of function ‘dlog’ [-Wimplicit-function-declaration] 120 | dlog(LOG_ERR, "LogFile path is longer than %u characters", | ^~~~ read_config_yy.y:120:17: warning: nested extern declaration of ‘dlog’ [-Wnested-externs] read_config_yy.y:240:14: warning: implicit declaration of function ‘inet_aton’; did you mean ‘in6_pton’? [-Wimplicit-function-declaration] 240 | if (!inet_aton($2, &conf.channel[conf.channel_num].u.mcast.in)) { | ^~~~~~~~~ | in6_pton Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1637 Signed-off-by: Sam James Signed-off-by: Pablo Neira Ayuso --- posted via https://bugzilla.netfilter.org/show_bug.cgi?id=1637 src/read_config_lex.l | 3 ++- src/read_config_yy.y | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/read_config_lex.l b/src/read_config_lex.l index 7dc400a3a9b5..27084329d185 100644 --- a/src/read_config_lex.l +++ b/src/read_config_lex.l @@ -21,6 +21,7 @@ #include +#include "log.h" #include "conntrackd.h" #include "read_config_yy.h" %} @@ -174,7 +175,7 @@ notrack [N|n][O|o][T|t][R|r][A|a][C|c][K|k] %% int -yywrap() +yywrap(void) { return 1; } diff --git a/src/read_config_yy.y b/src/read_config_yy.y index a2154be3733e..f06c6afff7cb 100644 --- a/src/read_config_yy.y +++ b/src/read_config_yy.y @@ -31,14 +31,25 @@ #include "cidr.h" #include "helper.h" #include "stack.h" +#include "log.h" + +#include +#include +#include + #include #include + #include #include extern char *yytext; extern int yylineno; +int yylex (void); +int yyerror (char *msg); +void yyrestart (FILE *input_file); + struct ct_conf conf; static void __kernel_filter_start(void);