From: Tim Gardner Date: Thu, 28 Aug 2014 17:26:03 +0000 (-0600) Subject: fs: namespace: suppress 'may be used uninitialized' warnings X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=773e4c6d6930fa1ef813ac257ec23b77fa95dfd7;p=pandora-kernel.git fs: namespace: suppress 'may be used uninitialized' warnings commit b8850d1fa8e2f6653e57daf6d08e58c5f5eb2c85 upstream. The gcc version 4.9.1 compiler complains Even though it isn't possible for these variables to not get initialized before they are used. fs/namespace.c: In function ‘SyS_mount’: fs/namespace.c:2720:8: warning: ‘kernel_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized] ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags, ^ fs/namespace.c:2699:8: note: ‘kernel_dev’ was declared here char *kernel_dev; ^ fs/namespace.c:2720:8: warning: ‘kernel_type’ may be used uninitialized in this function [-Wmaybe-uninitialized] ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags, ^ fs/namespace.c:2697:8: note: ‘kernel_type’ was declared here char *kernel_type; ^ Fix the warnings by simplifying copy_mount_string() as suggested by Al Viro. Cc: Alexander Viro Signed-off-by: Tim Gardner Signed-off-by: Al Viro Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed