summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2014-08-28 11:26:03 -0600
committerBen Hutchings <ben@decadent.org.uk>2017-04-04 22:21:52 +0100
commit0ffcf69c1afee1cbe7c34f473e04e8526638295f (patch)
tree18d74fd6db1051d646feaafa0ddacbae2095cd7e /include
parent65be6fa1da9eb665ae50b2d52bc450e64cbc4ec0 (diff)
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 <viro@zeniv.linux.org.uk> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions