]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: silence build warning in gss_fill_context
authorJeff Layton <jlayton@redhat.com>
Thu, 7 Feb 2013 15:29:06 +0000 (10:29 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 17 Feb 2013 20:37:14 +0000 (15:37 -0500)
commitcc67b9ef47c0ac303aab32a89d514627a3431759
treefe5289c053f09dd4c1b1006942aa57869bbf448b
parenta0ebc83106579bbdba2ab3f3085b52988b76e08b
sunrpc: silence build warning in gss_fill_context

Since commit 4e2bf9cfbe7, gcc is throwing the following warning:

  CC [M]  net/sunrpc/auth_gss/auth_gss.o
In file included from include/linux/sunrpc/types.h:14:0,
                 from include/linux/sunrpc/sched.h:14,
                 from include/linux/sunrpc/clnt.h:18,
                 from net/sunrpc/auth_gss/auth_gss.c:45:
net/sunrpc/auth_gss/auth_gss.c: In function ‘gss_pipe_downcall’:
include/linux/sunrpc/debug.h:45:10: warning: ‘timeout’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
    printk(KERN_DEFAULT args); \
          ^
net/sunrpc/auth_gss/auth_gss.c:194:15: note: ‘timeout’ was declared here
  unsigned int timeout;
               ^
If simple_get_bytes returns an error, then we'll end up calling printk
with an uninitialized timeout value. Reasonably harmless, but fairly
simple to fix by removing the printout of the uninitialised parameters.

Cc: Andy Adamson <andros@netapp.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
[Trond: just remove the parameters rather than initialising timeout]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/auth_gss/auth_gss.c