00db10
commit 6ee3eab42979fdd5bb971a40fec32e04bb9dd2ad
00db10
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
00db10
Date:   Wed Jul 9 10:36:50 2014 +0530
00db10
00db10
    Fix -Wmaybe-uninitialized warning in xdr.c
00db10
    
00db10
    While we're at fixing build warnings, here's one unnecessary warning
00db10
    that can be fixed fairly easily.  The SIZE variable is never actually
00db10
    use uninitialized, but the compiler cannot make that out and thinks
00db10
    (correctly) that there is a potential for accessing SIZE without
00db10
    initializing it.  Make this safe by initializing SIZE to 0.
00db10
    
00db10
    Tested on x86_64.
00db10
00db10
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
00db10
index 7eac2d40f036aa70..b3e713cbc9c3e012 100644
00db10
--- a/sunrpc/xdr.c
00db10
+++ b/sunrpc/xdr.c
00db10
@@ -738,7 +738,7 @@ xdr_string (xdrs, cpp, maxsize)
00db10
      u_int maxsize;
00db10
 {
00db10
   char *sp = *cpp;	/* sp is the actual string pointer */
00db10
-  u_int size;
00db10
+  u_int size = 0;
00db10
   u_int nodesize;
00db10
 
00db10
   /*