]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pipesz: fix dead code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 19 May 2022 07:48:18 +0000 (09:48 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 19 May 2022 07:48:18 +0000 (09:48 +0200)
309                     if (!opt_quiet && n_opt_size > 1)
>>>     CID 378501:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "warnx(dcgettext(NULL, "usin...".
310                             warnx(_("using last specified size"));

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/pipesz.c

index db5ab3495970c0c2f62efebb34edc98e4d6c72fb..f586acb87a43ec5a00fb323c1e6277757b577f8a 100644 (file)
@@ -272,6 +272,7 @@ int main(int argc, char **argv)
                case 's':
                        sz = strtosize_or_err(optarg, _("invalid size argument"));
                        opt_size = sz >= INT_MAX ? INT_MAX : (int)sz;
+                       ++n_opt_size;
                        break;
                case 'v':
                        opt_verbose = TRUE;