diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2010-03-05 16:43:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:35 -0500 |
commit | 45bf5cd7be624712ef1591e9de71f0ff7ad21cf1 (patch) | |
tree | dfd51f59aad8a742462da0604ed8bd121a9833a1 /fs/compat_ioctl.c | |
parent | 08564fb7ab9ead9226b6154439c3fecd17972eb0 (diff) |
fs/compat_ioctl.c: suppress two warnings
fs/compat_ioctl.c: In function 'do_ioctl_trans':
fs/compat_ioctl.c:534: warning: 'karg' may be used uninitialized in this function
fs/compat_ioctl.c:533: warning: 'kcmd' may be used uninitialized in this function
fs/compat_ioctl.c:656: warning: 'ret' may be used uninitialized in this function
Reduces text size by 44 bytes.
If someone calls one of these functions with an unexpected argument, the
code's buggy as-is.
Amerigo Wang <amwang@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 0ca9ec4a79c3..6d55b61bfa79 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -545,7 +545,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp) | |||
545 | kcmd = MTIOCPOS; | 545 | kcmd = MTIOCPOS; |
546 | karg = &pos; | 546 | karg = &pos; |
547 | break; | 547 | break; |
548 | case MTIOCGET32: | 548 | default: /* MTIOCGET32 */ |
549 | kcmd = MTIOCGET; | 549 | kcmd = MTIOCGET; |
550 | karg = &get; | 550 | karg = &get; |
551 | break; | 551 | break; |
@@ -663,7 +663,7 @@ static int raw_ioctl(unsigned fd, unsigned cmd, | |||
663 | 663 | ||
664 | switch (cmd) { | 664 | switch (cmd) { |
665 | case RAW_SETBIND: | 665 | case RAW_SETBIND: |
666 | case RAW_GETBIND: { | 666 | default: { /* RAW_GETBIND */ |
667 | struct raw_config_request req; | 667 | struct raw_config_request req; |
668 | mm_segment_t oldfs = get_fs(); | 668 | mm_segment_t oldfs = get_fs(); |
669 | 669 | ||