Whamcloud - gitweb
LU-3097 build: fix 'missing break' errors 64/7164/4
authorSebastien Buisson <sebastien.buisson@bull.net>
Mon, 29 Jul 2013 15:19:15 +0000 (17:19 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 30 Aug 2013 17:53:21 +0000 (17:53 +0000)
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 <sebastien.buisson@bull.net>
Change-Id: Ib96784433db5075bb6fb916024c1c217850f7eb6
Reviewed-on: http://review.whamcloud.com/7164
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lov/lovsub_lock.c
lustre/tests/multiop.c
lustre/utils/lfs.c

index 8da2366..deee598 100644 (file)
@@ -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();
index c1c44bc..519e77f 100644 (file)
@@ -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) {
index 6bcf972..0cfe790 100644 (file)
@@ -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",