Skip to contentSkip to conversation

IA32 (2.6.0-test6 - 2003-10-06.18.30) - 2 New warnings (gcc 3.2.2)

PATCH New John Cherry 2 participants 2 messages Oct 7, 2003

lore
Share & tools
lore
#0 lore raw

fs/smbfs/ioctl.c:34: warning: unreachable code at beginning of switch statement mm/memory.c:1276: warning: statement with no effect

#1 lore raw

PATCH 1/1 smbfs/ioctl: warning: unreachable code

On Mon, 6 Oct 2003 23:36:42 -0700 John Cherry <[email protected]> wrote:

| fs/smbfs/ioctl.c:34: warning: unreachable code at beginning of switch statement

patch_name: smbfs_ioctl.patch
patch_version: 2003-10-07.13:50:29
author: Randy.Dunlap <[email protected]>
description: make statements reachable
product: Linux
product_versions: 2.6.0-test6-2003.10.07
maintainer: Urban Widmark ([email protected])
diffstat: =

 fs/smbfs/ioctl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
fs/smbfs/ioctl.c renamed from fs/smbfs/ioctl.c~smbioc +6 -3
diff -Naurp ./fs/smbfs/ioctl.c~smbioc ./fs/smbfs/ioctl.c
@@ -31,17 +31,20 @@ smb_ioctl(struct inode *inode, struct fi
 	int result = -EINVAL;
 
 	switch (cmd) {
-		uid16_t uid16 = 0;
-		uid_t uid32 = 0;
 	case SMB_IOC_GETMOUNTUID:
+	{
+		uid16_t uid16 = 0;
 		SET_UID(uid16, server->mnt->mounted_uid);
 		result = put_user(uid16, (uid16_t *) arg);
 		break;
+	}
 	case SMB_IOC_GETMOUNTUID32:
+	{
+		uid_t uid32 = 0;
 		SET_UID(uid32, server->mnt->mounted_uid);
 		result = put_user(uid32, (uid_t *) arg);
 		break;
-
+	}
 	case SMB_IOC_NEWCONN:
 		/* arg is smb_conn_opt, or NULL if no connection was made */
 		if (!arg) {

--
~Randy