staging/lustre: silence gcc build warning
authorPeng Tao <bergwolf@gmail.com>
Mon, 3 Jun 2013 13:58:18 +0000 (21:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2013 18:32:50 +0000 (11:32 -0700)
got bellow build warning that is indeed a false alarm.

  CC [M]  drivers/staging/lustre/lustre/llite/llite_nfs.o
  drivers/staging/lustre/lustre/libcfs/nidstrings.c: In function ‘
  libcfs_str2net_internal’:
  drivers/staging/lustre/lustre/libcfs/nidstrings.c:432:17: warning: ‘nf’ may be
  used uninitialized in this function [-Wuninitializ
  ed]

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/nidstrings.c

index 9a2d70ce24216eec4d843cad1e7cd3d2f3843737..ccfd1078a906f4c7e520a784ad4f362f4b2299b1 100644 (file)
@@ -414,7 +414,7 @@ libcfs_nid2str(lnet_nid_t nid)
 static struct netstrfns *
 libcfs_str2net_internal(const char *str, __u32 *net)
 {
-       struct netstrfns *nf;
+       struct netstrfns *uninitialized_var(nf);
        int            nob;
        int            netnum;
        int            i;