[PATCH 5/9] staging/lustre: silence gcc build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
 drivers/staging/lustre/lustre/libcfs/nidstrings.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/nidstrings.c b/drivers/staging/lustre/lustre/libcfs/nidstrings.c
index 9a2d70c..ccfd107 100644
--- a/drivers/staging/lustre/lustre/libcfs/nidstrings.c
+++ b/drivers/staging/lustre/lustre/libcfs/nidstrings.c
@@ -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;
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux