From: Andreas Jaeger Date: Fri, 21 Dec 2001 10:16:16 +0000 (+0000) Subject: * elf/dblloadmod1.c: Add prototype to avoid warning. X-Git-Tag: cvs/glibc-2-3~1272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a49d0179dbc21bcdee7701d296b54e2215e0ed8b;p=thirdparty%2Fglibc.git * elf/dblloadmod1.c: Add prototype to avoid warning. * elf/dblloadmod2.c: Likewise. * elf/dblloadmod3.c: Likewise. * elf/reldepmod5.c: Likewise. * elf/reldepmod6.c: Likewise. * elf/dl-conflict.c (_dl_resolve_conflicts): Add unused attribute for resolve_conflict_map since RESOLVE_CONFLICT_FIND_MAP is not used on all architectures. * sunrpc/svc_tcp.c: Add noreturn attribute for svctcp_rendezvous_abort. * sunrpc/svc_unix.c: Likewise for svcunix_rendezvous_abort. * sysdeps/generic/strstr.c (strstr): Add paranthese for assignment to avoid warning. --- diff --git a/elf/dblloadmod1.c b/elf/dblloadmod1.c index b10f366ee9c..ecec29ec636 100644 --- a/elf/dblloadmod1.c +++ b/elf/dblloadmod1.c @@ -1,4 +1,5 @@ extern int bar (void); +extern int foo (void); int foo (void) diff --git a/elf/dblloadmod2.c b/elf/dblloadmod2.c index 261af2b5805..3e20aa941bf 100644 --- a/elf/dblloadmod2.c +++ b/elf/dblloadmod2.c @@ -1,4 +1,6 @@ extern int bar (void); +extern int baz (void); +extern int xyzzy (void); int baz (void) diff --git a/elf/dblloadmod3.c b/elf/dblloadmod3.c index 22b8a048110..80ac3a63753 100644 --- a/elf/dblloadmod3.c +++ b/elf/dblloadmod3.c @@ -1,3 +1,4 @@ +extern int bar (void); extern int baz (void); int diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c index 5426a5ad442..f4c20eaad07 100644 --- a/elf/dl-conflict.c +++ b/elf/dl-conflict.c @@ -54,7 +54,9 @@ do \ (map) = resolve_conflict_map; \ } while (0) - struct link_map *resolve_conflict_map = _dl_loaded; + struct link_map *resolve_conflict_map __attribute__ ((__unused__)) + = _dl_loaded; + #include "dynamic-link.h" diff --git a/elf/reldepmod5.c b/elf/reldepmod5.c index eae70da1e29..62df6971626 100644 --- a/elf/reldepmod5.c +++ b/elf/reldepmod5.c @@ -1,3 +1,5 @@ +extern int foo (void); + int foo (void) { diff --git a/elf/reldepmod6.c b/elf/reldepmod6.c index 95c18d4cdbc..cd2aeb400dc 100644 --- a/elf/reldepmod6.c +++ b/elf/reldepmod6.c @@ -1,4 +1,5 @@ extern int call_me (void); +extern int bar (void); int bar (void) diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index cda2484b6f9..8249474a57b 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -82,7 +82,7 @@ static const struct xp_ops svctcp_op = */ static bool_t rendezvous_request (SVCXPRT *, struct rpc_msg *); static enum xprt_stat rendezvous_stat (SVCXPRT *); -static void svctcp_rendezvous_abort (void); +static void svctcp_rendezvous_abort (void) __attribute__ ((__noreturn__)); /* This function makes sure abort() relocation goes through PLT and thus can be lazy bound. */ diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index 72bc9c2ddaa..763021f9a47 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -78,7 +78,7 @@ static const struct xp_ops svcunix_op = */ static bool_t rendezvous_request (SVCXPRT *, struct rpc_msg *); static enum xprt_stat rendezvous_stat (SVCXPRT *); -static void svcunix_rendezvous_abort (void); +static void svcunix_rendezvous_abort (void) __attribute__ ((__noreturn__)); /* This function makes sure abort() relocation goes through PLT and thus can be lazy bound. */ diff --git a/sysdeps/generic/strstr.c b/sysdeps/generic/strstr.c index ff295e0635a..e7e14e498d0 100644 --- a/sysdeps/generic/strstr.c +++ b/sysdeps/generic/strstr.c @@ -49,7 +49,7 @@ strstr (phaystack, pneedle) haystack = (const unsigned char *) phaystack; - if (b = *(needle = (const unsigned char *) pneedle)) + if ((b = *(needle = (const unsigned char *) pneedle))) { chartype c; haystack--; /* possible ANSI violation */