Commit 45bf5cd7be624712ef1591e9de71f0ff7ad21cf1

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent 08564fb7ab

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -545,7 +545,7 @@
545 545 kcmd = MTIOCPOS;
546 546 karg = &pos;
547 547 break;
548   - case MTIOCGET32:
  548 + default: /* MTIOCGET32 */
549 549 kcmd = MTIOCGET;
550 550 karg = &get;
551 551 break;
... ... @@ -663,7 +663,7 @@
663 663  
664 664 switch (cmd) {
665 665 case RAW_SETBIND:
666   - case RAW_GETBIND: {
  666 + default: { /* RAW_GETBIND */
667 667 struct raw_config_request req;
668 668 mm_segment_t oldfs = get_fs();
669 669