diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-07-09 10:36:50 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-07-09 10:36:50 +0530 |
commit | 6ee3eab42979fdd5bb971a40fec32e04bb9dd2ad (patch) | |
tree | 70452bbbb53f12492f2685494adca1b079637525 /sunrpc | |
parent | Fix Wundef warning for __cplusplus (diff) | |
download | glibc-6ee3eab42979fdd5bb971a40fec32e04bb9dd2ad.tar.gz glibc-6ee3eab42979fdd5bb971a40fec32e04bb9dd2ad.tar.bz2 glibc-6ee3eab42979fdd5bb971a40fec32e04bb9dd2ad.zip |
Fix -Wmaybe-uninitialized warning in xdr.c
While we're at fixing build warnings, here's one unnecessary warning
that can be fixed fairly easily. The SIZE variable is never actually
use uninitialized, but the compiler cannot make that out and thinks
(correctly) that there is a potential for accessing SIZE without
initializing it. Make this safe by initializing SIZE to 0.
Tested on x86_64.
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index b3f96ca4dc..129abd8f00 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -739,7 +739,7 @@ xdr_string (xdrs, cpp, maxsize) u_int maxsize; { char *sp = *cpp; /* sp is the actual string pointer */ - u_int size; + u_int size = 0; u_int nodesize; /* |