On Fri, Jul 12, 2019 at 4:37 PM Sam Protsenko <semen.protse...@linaro.org> wrote: > > On Fri, Jul 12, 2019 at 3:50 PM Eugeniu Rosca <ero...@de.adit-jv.com> wrote: > > > > Fix warning V1037 reported by PVS-Studio Static Analyzer: > > Two or more case-branches perform the same actions. Check lines: 49, 53 > > > > Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB > > fields") > > Signed-off-by: Eugeniu Rosca <ero...@de.adit-jv.com> > > Reviewed-by: Igor Opaniuk <igor.opan...@gmail.com> > > --- > > v2: > > - Added 'Reviewed-by: Igor Opaniuk' from v1 > > > > v1: > > - https://patchwork.ozlabs.org/patch/1131301/ > > --- > > Reviewed-by: Sam Protsenko <semen.protse...@linaro.org> > > > cmd/bcb.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/cmd/bcb.c b/cmd/bcb.c > > index 2bd5a744deb5..3b1c7434e287 100644 > > --- a/cmd/bcb.c > > +++ b/cmd/bcb.c > > @@ -46,9 +46,6 @@ static int bcb_is_misused(int argc, char *const argv[]) > > > > switch (cmd) { > > case BCB_CMD_LOAD: > > - if (argc != 3) > > - goto err; > > - break;
Wait, one note here... Can you please add /* Fall through */ comment here? I remember that new GCC was complaining on cases without break that don't have such comment or corresponding fall-through attribute. I can see that U-Boot build doesn't emit any warnings for that case, but I think such comment would be useful anyway. > > case BCB_CMD_FIELD_SET: > > if (argc != 3) > > goto err; > > -- > > 2.22.0 > > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot