Forráskód Böngészése

dpkg: Annotate case statements that fall through with a comment

Be explicit, so that code readers or static analyzers do not get
confused.

Warned-by: coverity
Guillem Jover 12 éve
szülő
commit
dd0ec1036f
2 módosított fájl, 2 hozzáadás és 0 törlés
  1. 1 0
      src/configure.c
  2. 1 0
      src/packages.c

+ 1 - 0
src/configure.c

@@ -504,6 +504,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff)
 	case cfo_install:
 	case cfo_install:
 		printf(_("Installing new version of config file %s ...\n"),
 		printf(_("Installing new version of config file %s ...\n"),
 		       usenode->name);
 		       usenode->name);
+		/* Fall through. */
 	case cfo_newconff:
 	case cfo_newconff:
 		strcpy(cdr2rest, DPKGNEWEXT);
 		strcpy(cdr2rest, DPKGNEWEXT);
 		trig_path_activate(usenode, pkg);
 		trig_path_activate(usenode, pkg);

+ 1 - 0
src/packages.c

@@ -632,6 +632,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
     case found_none:
     case found_none:
       anycannotfixbytrig = true;
       anycannotfixbytrig = true;
       ok = dep_check_halt;
       ok = dep_check_halt;
+      /* Fall through. */
     case found_forced:
     case found_forced:
       varbuf_add_str(aemsgs, " ");
       varbuf_add_str(aemsgs, " ");
       varbuf_add_pkgbin_name(aemsgs, pkg, &pkg->installed, pnaw_nonambig);
       varbuf_add_pkgbin_name(aemsgs, pkg, &pkg->installed, pnaw_nonambig);