* [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled
@ 2013-02-26 19:12 Vijay Subramanian
2013-02-26 19:23 ` Vijay Subramanian
2013-02-27 1:36 ` Stephen Hemminger
0 siblings, 2 replies; 4+ messages in thread
From: Vijay Subramanian @ 2013-02-26 19:12 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Vijay Subramanian
Commit (5a650703d47e10aa386406c855eff5a593b2120b Makefile: make warnings into
errors ) causes the following build error.
gcc -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
-Wmissing-declarations -Wold-style-definition -O2 -I../include
-DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\"
-D_GNU_SOURCE -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\"
-DYY_NO_INPUT -c -o m_ipt.o m_ipt.c
cc1: warnings being treated as errors
m_ipt.c:72: error: no previous prototype for 'xtables_register_target'
m_ipt.c:361: error: no previous prototype for 'build_st'
make[1]: *** [m_ipt.o] Error 1
This is fixed by adding the prototype in the header include/iptables.h
I am not sure if this is due to something wrong on my build system but I am
using current glibc 2.17.
Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
---
include/iptables.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/iptables.h b/include/iptables.h
index dd844c1..f1e62e2 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -143,6 +143,8 @@ extern int line;
/* Your shared library should call one of these. */
extern void register_match(struct iptables_match *me);
extern void register_target(struct iptables_target *me);
+extern void xtables_register_target(struct iptables_target *me);
+extern int build_st(struct iptables_target *target, struct ipt_entry_target *t);
extern struct in_addr *dotted_to_addr(const char *dotted);
extern char *addr_to_dotted(const struct in_addr *addrp);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled
2013-02-26 19:12 [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled Vijay Subramanian
@ 2013-02-26 19:23 ` Vijay Subramanian
2013-02-27 14:53 ` Petr Šabata
2013-02-27 1:36 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Vijay Subramanian @ 2013-02-26 19:23 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Vijay Subramanian
On 26 February 2013 11:12, Vijay Subramanian
<subramanian.vijay@gmail.com> wrote:
> Commit (5a650703d47e10aa386406c855eff5a593b2120b Makefile: make warnings into
> errors ) causes the following build error.
>
A similar error occurs for misc/ss.c
gcc -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
-Wmissing-declarations -Wold-style-definition -O2
-I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\"
-DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -c -o ss.o ss.c
cc1: warnings being treated as errors
ss.c: In function 'user_ent_hash_build':
ss.c:300: error: ignoring return value of 'fscanf', declared with
attribute warn_unused_result
ss.c: In function 'get_slabstat':
ss.c:382: error: ignoring return value of 'fgets', declared with
attribute warn_unused_result
ss.c: In function 'init_service_resolver':
ss.c:506: error: ignoring return value of 'fgets', declared with
attribute warn_unused_result
---cut---
Not sure what is the best fix for this but can send a patch based on
suggestions.
I am using "Ubuntu 10.04.1 LTS" with ldd (GNU libc) 2.17.
Vijay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled
2013-02-26 19:12 [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled Vijay Subramanian
2013-02-26 19:23 ` Vijay Subramanian
@ 2013-02-27 1:36 ` Stephen Hemminger
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2013-02-27 1:36 UTC (permalink / raw)
To: Vijay Subramanian; +Cc: netdev, Stephen Hemminger
On Tue, 26 Feb 2013 11:12:07 -0800
Vijay Subramanian <subramanian.vijay@gmail.com> wrote:
> Commit (5a650703d47e10aa386406c855eff5a593b2120b Makefile: make warnings into
> errors ) causes the following build error.
>
> gcc -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
> -Wmissing-declarations -Wold-style-definition -O2 -I../include
> -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\"
> -D_GNU_SOURCE -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\"
> -DYY_NO_INPUT -c -o m_ipt.o m_ipt.c
> cc1: warnings being treated as errors
> m_ipt.c:72: error: no previous prototype for 'xtables_register_target'
> m_ipt.c:361: error: no previous prototype for 'build_st'
> make[1]: *** [m_ipt.o] Error 1
>
> This is fixed by adding the prototype in the header include/iptables.h
>
> I am not sure if this is due to something wrong on my build system but I am
> using current glibc 2.17.
>
>
> Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled
2013-02-26 19:23 ` Vijay Subramanian
@ 2013-02-27 14:53 ` Petr Šabata
0 siblings, 0 replies; 4+ messages in thread
From: Petr Šabata @ 2013-02-27 14:53 UTC (permalink / raw)
To: Vijay Subramanian; +Cc: netdev, Stephen Hemminger
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
On Tue, Feb 26, 2013 at 11:23:45AM -0800, Vijay Subramanian wrote:
> On 26 February 2013 11:12, Vijay Subramanian
> <subramanian.vijay@gmail.com> wrote:
> > Commit (5a650703d47e10aa386406c855eff5a593b2120b Makefile: make warnings into
> > errors ) causes the following build error.
> >
>
> A similar error occurs for misc/ss.c
Yep, also in misc/ifstat.c and misc/nstat.c on ftruncate() ...
P
[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-27 14:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 19:12 [iproute2 ] Fix compilation error of m_ipt.c with -Werror enabled Vijay Subramanian
2013-02-26 19:23 ` Vijay Subramanian
2013-02-27 14:53 ` Petr Šabata
2013-02-27 1:36 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.