connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] unit: Fix missing declarations in test-iptables
       [not found] <20220124093515.7166-1-Emmanuel.VAUTRIN@cpexterne.org>
@ 2022-01-24  9:38 ` VAUTRIN Emmanuel (Canal Plus Prestataire)
  2022-01-25  9:47   ` Daniel Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: VAUTRIN Emmanuel (Canal Plus Prestataire) @ 2022-01-24  9:38 UTC (permalink / raw)
  To: connman


[-- Attachment #1.1: Type: text/plain, Size: 1433 bytes --]

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(-)

diff --git a/unit/test-iptables.c b/unit/test-iptables.c
index cd261d054132..f08736ea5f0e 100644
--- a/unit/test-iptables.c
+++ b/unit/test-iptables.c
@@ -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


[-- Attachment #1.2: Type: text/html, Size: 2588 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-unit-Fix-missing-declarations-in-test-iptables.patch --]
[-- Type: text/x-patch; name="0001-unit-Fix-missing-declarations-in-test-iptables.patch", Size: 1559 bytes --]

From f15133a1511105a07b14e3f9f32172db51e031e5 Mon Sep 17 00:00:00 2001
From: Emmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org>
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(-)

diff --git a/unit/test-iptables.c b/unit/test-iptables.c
index cd261d054132..f08736ea5f0e 100644
--- a/unit/test-iptables.c
+++ b/unit/test-iptables.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] unit: Fix missing declarations in test-iptables
  2022-01-24  9:38 ` [PATCH] unit: Fix missing declarations in test-iptables VAUTRIN Emmanuel (Canal Plus Prestataire)
@ 2022-01-25  9:47   ` Daniel Wagner
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Wagner @ 2022-01-25  9:47 UTC (permalink / raw)
  To: VAUTRIN Emmanuel (Canal Plus Prestataire); +Cc: connman

On Mon, Jan 24, 2022 at 09:38:59AM +0000, VAUTRIN Emmanuel (Canal Plus Prestataire) wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-25  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220124093515.7166-1-Emmanuel.VAUTRIN@cpexterne.org>
2022-01-24  9:38 ` [PATCH] unit: Fix missing declarations in test-iptables VAUTRIN Emmanuel (Canal Plus Prestataire)
2022-01-25  9:47   ` Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).