Skip to contentSkip to conversation

unit: Fix missing declarations in test-iptables

PATCH In review VAUTRIN Emmanuel (Canal Plus Prestataire) 2 participants 2 messages Jan 24, 2022 – Jan 25, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 unit: Fix missing declarations in test-iptables

gcc reports with:

unit/test-iptables.c:72:5: error: no previous declaration for 'xt_match_parse' [-Werror=missing-declarations]
72 | int xt_match_parse(int c, char **argv, int invert, unsigned int *flags,

     |     ^~~~~~~~~~~~~~
 unit/test-iptables.c:78:5: error: no previous declaration for 'xt_target_parse' [-Werror=missing-declarations]
  78 | int xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
     |     ^~~~~~~~~~~~~~~
---
 unit/test-iptables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
unit/test-iptables.c +2 -2
index cd261d054132..f08736ea5f0e 100644
@@ -69,13 +69,13 @@ static void set_test_config(enum configtype type)
 #define IP6T_SO_GET_INFO                (IP6T_BASE_CTL)
 #define IP6T_SO_GET_ENTRIES             (IP6T_BASE_CTL + 1)
 
-int xt_match_parse(int c, char **argv, int invert, unsigned int *flags,
+int static xt_match_parse(int c, char **argv, int invert, unsigned int *flags,
                        const void *entry, struct xt_entry_match **match)
 {
        return 0;
 }
 
-int xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
+int static xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
                        const void *entry, struct xt_entry_target **targetinfo)
 {
        return 0;

--
2.25.1

From f15133a1511105a07b14e3f9f32172db51e031e5 Mon Sep 17 00:00:00 2001
From: Emmanuel VAUTRIN <[email protected]>
Date: Mon, 24 Jan 2022 10:11:40 +0100
Subject: [PATCH] unit: Fix missing declarations in test-iptables

gcc reports with:

unit/test-iptables.c:72:5: error: no previous declaration for 'xt_match_parse' [-Werror=missing-declarations]
72 | int xt_match_parse(int c, char **argv, int invert, unsigned int *flags,

      |     ^~~~~~~~~~~~~~
 unit/test-iptables.c:78:5: error: no previous declaration for 'xt_target_parse' [-Werror=missing-declarations]
   78 | int xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
      |     ^~~~~~~~~~~~~~~
---
 unit/test-iptables.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
unit/test-iptables.c +2 -2
index cd261d054132..f08736ea5f0e 100644
@@ -69,13 +69,13 @@ static void set_test_config(enum configtype type)
 #define IP6T_SO_GET_INFO		(IP6T_BASE_CTL)
 #define IP6T_SO_GET_ENTRIES		(IP6T_BASE_CTL + 1)
 
-int xt_match_parse(int c, char **argv, int invert, unsigned int *flags,
+int static xt_match_parse(int c, char **argv, int invert, unsigned int *flags,
 			const void *entry, struct xt_entry_match **match)
 {
 	return 0;
 }
 
-int xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
+int static xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
 			const void *entry, struct xt_entry_target **targetinfo)
 {
 	return 0;
Signature · 1 line
2.25.1
#2 lore raw
Quoted 8 lines · VAUTRIN Emmanuel (Canal Plus Prestataire)

gcc reports with:

unit/test-iptables.c:72:5: error: no previous declaration for 'xt_match_parse' [-Werror=missing-declarations]
72 | int xt_match_parse(int c, char **argv, int invert, unsigned int *flags,

     |     ^~~~~~~~~~~~~~
 unit/test-iptables.c:78:5: error: no previous declaration for 'xt_target_parse' [-Werror=missing-declarations]
  78 | int xt_target_parse(int c, char **argv, int invert, unsigned int *flags,
     |     ^~~~~~~~~~~~~~~

Patch applied.

Thanks,
Daniel