From 3439adf093ef8d36ae7f95687c92ad1d436329c8 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Mon, 29 Jul 2013 17:19:15 +0200 Subject: [PATCH] LU-3097 build: fix 'missing break' errors Fix 'missing break' issues found by Coverity version 6.5.1: Missing break in switch (MISSING_BREAK) This case is not terminated by a 'break' statement. Signed-off-by: Sebastien Buisson Change-Id: Ib96784433db5075bb6fb916024c1c217850f7eb6 Reviewed-on: http://review.whamcloud.com/7164 Reviewed-by: John L. Hammond Reviewed-by: James Nunez Tested-by: Hudson Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- lustre/lov/lovsub_lock.c | 1 + lustre/tests/multiop.c | 11 ++++++----- lustre/utils/lfs.c | 35 ++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/lustre/lov/lovsub_lock.c b/lustre/lov/lovsub_lock.c index 8da2366..deee598 100644 --- a/lustre/lov/lovsub_lock.c +++ b/lustre/lov/lovsub_lock.c @@ -380,6 +380,7 @@ static int lovsub_lock_delete_one(const struct lu_env *env, break; case CLS_HELD: CL_LOCK_DEBUG(D_ERROR, env, parent, "Delete CLS_HELD lock\n"); + /* falling through */ default: CERROR("Impossible state: %d\n", parent->cll_state); LBUG(); diff --git a/lustre/tests/multiop.c b/lustre/tests/multiop.c index c1c44bc..519e77f 100644 --- a/lustre/tests/multiop.c +++ b/lustre/tests/multiop.c @@ -632,11 +632,12 @@ int main(int argc, char **argv) } break; case 'Y': - if (fdatasync(fd) == -1) { - save_errno = errno; - perror("fdatasync"); - exit(save_errno); - } + if (fdatasync(fd) == -1) { + save_errno = errno; + perror("fdatasync"); + exit(save_errno); + } + break; case 'z': len = atoi(commands+1); if (lseek(fd, len, SEEK_SET) == -1) { diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 6bcf972..0cfe790 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -1774,24 +1774,25 @@ static int lfs_df(int argc, char **argv) {0, 0, 0, 0} }; - optind = 0; + optind = 0; while ((c = getopt_long(argc, argv, "hilp:", long_opts, NULL)) != -1) { - switch (c) { - case 'i': - ishow = 1; - break; - case 'h': - cooked = 1; - break; - case 'l': - lazy = 1; - case 'p': - pool_name = optarg; - break; - default: - return CMD_HELP; - } - } + switch (c) { + case 'i': + ishow = 1; + break; + case 'h': + cooked = 1; + break; + case 'l': + lazy = 1; + break; + case 'p': + pool_name = optarg; + break; + default: + return CMD_HELP; + } + } if (optind < argc && !realpath(argv[optind], path)) { rc = -errno; fprintf(stderr, "error: invalid path '%s': %s\n", -- 1.8.3.1