Skip to contentSkip to conversation

Removed a bunch random warnings

PATCH Superseded Steve Dickson 3 participants 21 messages Jul 19, 2017 – Jul 21, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Removed a bunch random warnings

I upgraded to Fedora 26 and went to apply Neil's
recent mount patches and ended up seeing all
these warning.

These patches fix those warnings

Steve Dickson (11):
rpcdebug.c: remove a warning
present_address: remove a warning
atomicio: removed a warning
cache.c: removed a couple warning
nfsd.c: removed a few warnings
bldev_read_serial: removed a couple warnings
device-discovery.c: removed a warning
network.c: removed some warnings
nfsmount: remove a warning
nfs4mount: removed a warning
nfsdcltrack.c: remove a warning

 support/misc/tcpwrapper.c        | 1 +
 support/nfs/atomicio.c           | 1 +
 tools/rpcdebug/rpcdebug.c        | 3 ++-
 utils/blkmapd/device-discovery.c | 1 +
 utils/blkmapd/device-inq.c       | 2 ++
 utils/mount/network.c            | 5 +++++
 utils/mount/nfs4mount.c          | 1 +
 utils/mount/nfsmount.c           | 1 +
 utils/mountd/cache.c             | 1 +
 utils/nfsd/nfsd.c                | 5 ++++-
 utils/nfsdcltrack/nfsdcltrack.c  | 1 +
 11 files changed, 20 insertions(+), 2 deletions(-)
Signature · 1 line
2.13.3
#1 lore raw

PATCH 1/11 rpcdebug.c: remove a warning

rpcdebug.c:77:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 tools/rpcdebug/rpcdebug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/rpcdebug/rpcdebug.c +2 -1
index 18b1622..68206cc 100644
@@ -74,7 +74,8 @@ main(int argc, char **argv)
 			opt_c = 1;
 			break;
 		case 'h':
-			usage(0, module);
+			usage(0, module); /* usage does not return */
+			break;
 		case 'm':
 			module = optarg;
 			break;
Signature · 1 line
2.13.3
#2 lore raw

PATCH 2/11 present_address: remove a warning

In reply to Steve Dickson

tcpwrapper.c:73:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 support/misc/tcpwrapper.c | 1 +
 1 file changed, 1 insertion(+)
support/misc/tcpwrapper.c +1 -0
index 06b0a46..3128053 100644
@@ -72,6 +72,7 @@ present_address(const struct sockaddr *sap, char *buf, const size_t buflen)
 	case AF_INET:
 		if (inet_ntop(AF_INET, &sin->sin_addr, buf, len) != 0)
 			return;
+		break;
 	case AF_INET6:
 		if (inet_ntop(AF_INET6, &sin6->sin6_addr, buf, len) != 0)
 			return;
Signature · 1 line
2.13.3
#3 lore raw

Re: [PATCH 02/11] present_address: remove a warning

Quoted 1 line · Steve Dickson

tcpwrapper.c:73:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

This one looks like a real bugfix to me; could use a changelog.

--b.

Quoted 25 lines
---
 support/misc/tcpwrapper.c | 1 +
 1 file changed, 1 insertion(+)
support/misc/tcpwrapper.c +1 -0
index 06b0a46..3128053 100644
@@ -72,6 +72,7 @@ present_address(const struct sockaddr *sap, char *buf, const size_t buflen)
 	case AF_INET:
 		if (inet_ntop(AF_INET, &sin->sin_addr, buf, len) != 0)
 			return;
+		break;
 	case AF_INET6:
 		if (inet_ntop(AF_INET6, &sin6->sin6_addr, buf, len) != 0)
 			return;
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 3/11 atomicio: removed a warning

In reply to Steve Dickson

atomicio.c:43:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 support/nfs/atomicio.c | 1 +
 1 file changed, 1 insertion(+)
support/nfs/atomicio.c +1 -0
index 5e760e6..0234072 100644
@@ -42,6 +42,7 @@ ssize_t atomicio(ssize_t(*f) (int, void *, size_t), int fd, void *_s, size_t n)
 		case -1:
 			if (errno == EINTR || errno == EAGAIN)
 				continue;
+			break;
 		case 0:
 			if (pos != 0)
 				return pos;
Signature · 1 line
2.13.3
#5 lore raw

Re: [PATCH 03/11] atomicio: removed a warning

Quoted 1 line · Steve Dickson

atomicio.c:43:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

I think this is wrong. For example, if we don't have permission to do the IO, this causes atomicio() to return 0 instead of -1.

--b.

Quoted 25 lines
---
 support/nfs/atomicio.c | 1 +
 1 file changed, 1 insertion(+)
support/nfs/atomicio.c +1 -0
index 5e760e6..0234072 100644
@@ -42,6 +42,7 @@ ssize_t atomicio(ssize_t(*f) (int, void *, size_t), int fd, void *_s, size_t n)
 		case -1:
 			if (errno == EINTR || errno == EAGAIN)
 				continue;
+			break;
 		case 0:
 			if (pos != 0)
 				return pos;
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

Re: [PATCH 03/11] atomicio: removed a warning

Quoted 4 lines · J. Bruce Fields
Quoted 1 line · Steve Dickson

atomicio.c:43:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

I think this is wrong. For example, if we don't have permission to do the IO, this causes atomicio() to return 0 instead of -1.

I see your point... Nice catch!

steved.

#7 lore raw

PATCH 4/11 cache.c: removed a couple warning

In reply to Steve Dickson

cache.c:623:13: warning: In the GNU C Library, "major" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>.
if (parsed->major != major(stb.st_dev) ||

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cache.c:624:13: warning: In the GNU C Library, "minor" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "minor", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "minor", you should undefine it after including <sys/types.h>.

       parsed->minor != minor(stb.st_dev))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 utils/mountd/cache.c | 1 +
 1 file changed, 1 insertion(+)
utils/mountd/cache.c +1 -0
index ca6c84f..e49300d 100644
@@ -11,6 +11,7 @@
 #include <config.h>
 #endif
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/select.h>
 #include <sys/stat.h>
Signature · 1 line
2.13.3
#8 lore raw

PATCH 5/11 nfsd.c: removed a few warnings

In reply to Steve Dickson

nfsd.c:187:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
nfsd.c:213:8: warning: this statement may fall through [-Wimplicit-fallthrough=]nfsd.c:263:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/nfsd/nfsd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
utils/nfsd/nfsd.c +4 -1
index 2b38249..1d35658 100644
@@ -198,6 +198,7 @@ main(int argc, char **argv)
 					minorvers = 0;
 					minorversset = minormask;
 				}
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERUNSET(versbits, c);
@@ -220,6 +221,7 @@ main(int argc, char **argv)
 					NFSCTL_MINORSET(minorvers, i);
 				} else
 					minorvers = minorversset = minormask;
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERSET(versbits, c);
@@ -261,8 +263,9 @@ main(int argc, char **argv)
 			break;
 		default:
 			fprintf(stderr, "Invalid argument: '%c'\n", c);
+			/* FALLTHRU */
 		case 'h':
-			usage(progname);
+			usage(progname); /* usage does not return */
 		}
 	}
 
Signature · 1 line
2.13.3
#9 lore raw

Re: [PATCH 05/11] nfsd.c: removed a few warnings

Quoted 2 lines · Steve Dickson

nfsd.c:187:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
nfsd.c:213:8: warning: this statement may fall through [-Wimplicit-fallthrough=]nfsd.c:263:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

Are you sure about this? It looks to me like the fall through was intended in the -N4 and -V4 cases.

--b.

Quoted 44 lines
---
 utils/nfsd/nfsd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
utils/nfsd/nfsd.c +4 -1
index 2b38249..1d35658 100644
@@ -198,6 +198,7 @@ main(int argc, char **argv)
 					minorvers = 0;
 					minorversset = minormask;
 				}
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERUNSET(versbits, c);
@@ -220,6 +221,7 @@ main(int argc, char **argv)
 					NFSCTL_MINORSET(minorvers, i);
 				} else
 					minorvers = minorversset = minormask;
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERSET(versbits, c);
@@ -261,8 +263,9 @@ main(int argc, char **argv)
 			break;
 		default:
 			fprintf(stderr, "Invalid argument: '%c'\n", c);
+			/* FALLTHRU */
 		case 'h':
-			usage(progname);
+			usage(progname); /* usage does not return */
 		}
 	}
 
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#10 lore raw

Re: [PATCH 05/11] nfsd.c: removed a few warnings

Quoted 6 lines · J. Bruce Fields
Quoted 2 lines · Steve Dickson

nfsd.c:187:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
nfsd.c:213:8: warning: this statement may fall through [-Wimplicit-fallthrough=]nfsd.c:263:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

Are you sure about this? It looks to me like the fall through was intended in the -N4 and -V4 cases.

Wow... how un-obvious that! The -N4 actually does use the NFSCTL_VERUNSET() in the 3,2 case... Talk about in needed of a comment! ;-)

steved.

Quoted 47 lines

--b.

Quoted 44 lines
---
 utils/nfsd/nfsd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
utils/nfsd/nfsd.c +4 -1
index 2b38249..1d35658 100644
@@ -198,6 +198,7 @@ main(int argc, char **argv)
 					minorvers = 0;
 					minorversset = minormask;
 				}
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERUNSET(versbits, c);
@@ -220,6 +221,7 @@ main(int argc, char **argv)
 					NFSCTL_MINORSET(minorvers, i);
 				} else
 					minorvers = minorversset = minormask;
+				break;
 			case 3:
 			case 2:
 				NFSCTL_VERSET(versbits, c);
@@ -261,8 +263,9 @@ main(int argc, char **argv)
 			break;
 		default:
 			fprintf(stderr, "Invalid argument: '%c'\n", c);
+			/* FALLTHRU */
 		case 'h':
-			usage(progname);
+			usage(progname); /* usage does not return */
 		}
 	}
 
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#11 lore raw

PATCH 6/11 bldev_read_serial: removed a couple warnings

In reply to Steve Dickson

device-inq.c:216:7: warning: this statement may fall through [-Wimplicit-fallthrough=] device-inq.c:223:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/blkmapd/device-inq.c | 2 ++
 1 file changed, 2 insertions(+)
utils/blkmapd/device-inq.c +2 -0
index 0062a8f..c7952c3 100644
@@ -216,6 +216,7 @@ struct bl_serial *bldev_read_serial(int fd, const char *filename)
 			if ((dev_id->len != 8) && (dev_id->len != 12) &&
 			    (dev_id->len != 16))
 				break;
+			/* FALLTHRU */
 		case 3:	/* NAA */
 			/* TODO: NAA validity judgement too complicated,
 			 * so just ingore it here.
@@ -224,6 +225,7 @@ struct bl_serial *bldev_read_serial(int fd, const char *filename)
 				BL_LOG_ERR("Binary code_set expected\n");
 				break;
 			}
+			/* FALLTHRU */
 		case 0:	/* vendor specific */
 		case 1:	/* T10 vendor identification */
 			current_id = dev_id->ids & 0xf;
Signature · 1 line
2.13.3
#12 lore raw

PATCH 7/11 device-discovery.c: removed a warning

In reply to Steve Dickson

device-discovery.c:171:13: warning: In the GNU C Library, "major" is defined
by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>.
} else if (dm_is_dm_major(major(dev)))

             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 utils/blkmapd/device-discovery.c | 1 +
 1 file changed, 1 insertion(+)
utils/blkmapd/device-discovery.c +1 -0
index c66669d..29bafb2 100644
@@ -26,6 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
Signature · 1 line
2.13.3
#13 lore raw

PATCH 8/11 network.c: removed some warnings

In reply to Steve Dickson

network.c:1234:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1382:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1477:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1508:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1574:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/mount/network.c | 5 +++++
 1 file changed, 5 insertions(+)
utils/mount/network.c +5 -0
index 281e935..19f14e5 100644
@@ -1235,6 +1235,7 @@ nfs_nfs_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'nfsprog=' option"),
 				progname);
@@ -1383,6 +1384,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'port=' option"),
 				progname);
@@ -1478,6 +1480,7 @@ nfs_mount_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountprog=' option"),
 				progname);
@@ -1509,6 +1512,7 @@ nfs_mount_version(struct mount_options *options, unsigned long *version)
 			*version = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountvers=' option"),
 				progname);
@@ -1575,6 +1579,7 @@ nfs_mount_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountport=' option"),
 				progname);
Signature · 1 line
2.13.3
#14 lore raw

Re: [PATCH 08/11] network.c: removed some warnings

Quoted 5 lines · Steve Dickson

network.c:1234:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1382:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1477:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1508:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1574:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Looks like after this an out-of-range port number will be treated as an unspecified port rather than returning an error. That sounds wrong.

I didn't check the others.

All of these "break" statements added without any explanation are making me nervous.

--b.

Quoted 56 lines
---
 utils/mount/network.c | 5 +++++
 1 file changed, 5 insertions(+)
utils/mount/network.c +5 -0
index 281e935..19f14e5 100644
@@ -1235,6 +1235,7 @@ nfs_nfs_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'nfsprog=' option"),
 				progname);
@@ -1383,6 +1384,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'port=' option"),
 				progname);
@@ -1478,6 +1480,7 @@ nfs_mount_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountprog=' option"),
 				progname);
@@ -1509,6 +1512,7 @@ nfs_mount_version(struct mount_options *options, unsigned long *version)
 			*version = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountvers=' option"),
 				progname);
@@ -1575,6 +1579,7 @@ nfs_mount_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountport=' option"),
 				progname);
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#15 lore raw

Re: [PATCH 08/11] network.c: removed some warnings

Quoted 7 lines · J. Bruce Fields
Quoted 5 lines · Steve Dickson

network.c:1234:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1382:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1477:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1508:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1574:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 7 lines

Looks like after this an out-of-range port number will be treated as an unspecified port rather than returning an error. That sounds wrong.

I didn't check the others.

All of these "break" statements added without any explanation are making me nervous.

Yeah you are right... Boy there are some subtle things going there...

Thanks for the review and cycles!

steved.

Quoted 59 lines

--b.

Quoted 56 lines
---
 utils/mount/network.c | 5 +++++
 1 file changed, 5 insertions(+)
utils/mount/network.c +5 -0
index 281e935..19f14e5 100644
@@ -1235,6 +1235,7 @@ nfs_nfs_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'nfsprog=' option"),
 				progname);
@@ -1383,6 +1384,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'port=' option"),
 				progname);
@@ -1478,6 +1480,7 @@ nfs_mount_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountprog=' option"),
 				progname);
@@ -1509,6 +1512,7 @@ nfs_mount_version(struct mount_options *options, unsigned long *version)
 			*version = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountvers=' option"),
 				progname);
@@ -1575,6 +1579,7 @@ nfs_mount_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountport=' option"),
 				progname);
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#16 lore raw

Re: [PATCH 08/11] network.c: removed some warnings

Quoted 13 lines · Steve Dickson
Quoted 10 lines · J. Bruce Fields
Quoted 5 lines · Steve Dickson

network.c:1234:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1382:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1477:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1508:6: warning: this statement may fall through [-Wimplicit-fallthrough=] network.c:1574:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Looks like after this an out-of-range port number will be treated as an unspecified port rather than returning an error. That sounds wrong.

Quoted 7 lines
Quoted 4 lines

I didn't check the others.

All of these "break" statements added without any explanation are making me nervous.

Yeah you are right... Boy there are some subtle things going there...

Thanks for the review and cycles!

If you respin these patches, it'd be helpful to either add a short comment explaining why the fallthrough is correct, or if you add a break, explain in the changelog why the old behavior was wrong and whether there was an actual user-visible bug.

Totally understood if that's too much work to be worth it right now, but then I'd rather let the warnings wait a little longer. If that makes it hard to see real warnings, then we can turn off those compiler flags for now. Quick fixes to shut up warnings can be as risky as missed warnings.

--b.

Quoted 62 lines

steved.

Quoted 59 lines

--b.

Quoted 56 lines
---
 utils/mount/network.c | 5 +++++
 1 file changed, 5 insertions(+)
utils/mount/network.c +5 -0
index 281e935..19f14e5 100644
@@ -1235,6 +1235,7 @@ nfs_nfs_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'nfsprog=' option"),
 				progname);
@@ -1383,6 +1384,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'port=' option"),
 				progname);
@@ -1478,6 +1480,7 @@ nfs_mount_program(struct mount_options *options, unsigned long *program)
 			*program = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountprog=' option"),
 				progname);
@@ -1509,6 +1512,7 @@ nfs_mount_version(struct mount_options *options, unsigned long *version)
 			*version = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountvers=' option"),
 				progname);
@@ -1575,6 +1579,7 @@ nfs_mount_port(struct mount_options *options, unsigned long *port)
 			*port = tmp;
 			return 1;
 		}
+		break;
 	case PO_BAD_VALUE:
 		nfs_error(_("%s: invalid value for 'mountport=' option"),
 				progname);
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#17 lore raw

PATCH 9/11 nfsmount: remove a warning

In reply to Steve Dickson

nfsmount.c:684:8: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/mount/nfsmount.c | 1 +
 1 file changed, 1 insertion(+)
utils/mount/nfsmount.c +1 -0
index 930622d..ae4a3da 100644
@@ -683,6 +683,7 @@ nfsmount(const char *spec, const char *node, int flags,
 			case RPC_SYSTEMERROR:
 				if (errno == ETIMEDOUT)
 					break;
+				/* FALLTHRU */
 			default:
 				rpc_mount_errors(*nfs_server.hostname, 0, bg);
 		        goto fail;
Signature · 1 line
2.13.3
#18 lore raw

PATCH 10/11 nfs4mount: removed a warning

In reply to Steve Dickson

nfs4mount.c:445:8: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/mount/nfs4mount.c | 1 +
 1 file changed, 1 insertion(+)
utils/mount/nfs4mount.c +1 -0
index 028e7cd..89629ed 100644
@@ -444,6 +444,7 @@ int nfs4mount(const char *spec, const char *node, int flags,
 			case RPC_SYSTEMERROR:
 				if (errno == ETIMEDOUT)
 					break;
+				/* FALLTHRU */
 			default:
 				rpc_mount_errors(hostname, 0, bg);
 				goto fail;
Signature · 1 line
2.13.3
#19 lore raw

PATCH 11/11 nfsdcltrack.c: remove a warning

In reply to Steve Dickson

nfsdcltrack.c:581:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/nfsdcltrack/nfsdcltrack.c | 1 +
 1 file changed, 1 insertion(+)
utils/nfsdcltrack/nfsdcltrack.c +1 -0
index 124c923..0baaa3e 100644
@@ -579,6 +579,7 @@ main(int argc, char **argv)
 		switch (arg) {
 		case 'd':
 			xlog_config(D_ALL, 1);
+			break;
 		case 'f':
 			xlog_syslog(0);
 			xlog_stderr(1);
Signature · 1 line
2.13.3
Acked-by on v1 11/11
#20 lore raw

Re: [PATCH 11/11] nfsdcltrack.c: remove a warning

Quoted 12 lines · Steve Dickson

nfsdcltrack.c:581:4: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 utils/nfsdcltrack/nfsdcltrack.c | 1 +
 1 file changed, 1 insertion(+)
utils/nfsdcltrack/nfsdcltrack.c +0 -0
index 124c923..0baaa3e 100644

utils/nfsdcltrack/nfsdcltrack.c main(int argc, char **argv) · line 585

Quoted 7 lines
utils/nfsdcltrack/nfsdcltrack.c +1 -0
@@ -579,6 +579,7 @@ main(int argc, char **argv)
 		switch (arg) {
 		case 'd':
 			xlog_config(D_ALL, 1);
+			break;
 		case 'f':
 			xlog_syslog(0);
 			xlog_stderr(1);