On Fri, Mar 5, 2021 at 12:47 PM Ryan Long <thisisryanl...@gmail.com> wrote: > > CID 1063856: Unchecked return value from library in > rtems_shell_main_chmod(). > > Closes #4281 > --- > cpukit/libmisc/shell/main_chmod.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/cpukit/libmisc/shell/main_chmod.c > b/cpukit/libmisc/shell/main_chmod.c > index 0c39072..df18ef1 100644 > --- a/cpukit/libmisc/shell/main_chmod.c > +++ b/cpukit/libmisc/shell/main_chmod.c > @@ -34,6 +34,7 @@ static int rtems_shell_main_chmod( > int n; > mode_t mode; > unsigned long tmp; > + int sc; > > if (argc < 2) { > fprintf(stderr,"%s: too few arguments\n", argv[0]); > @@ -53,7 +54,9 @@ static int rtems_shell_main_chmod( > * Now change the files modes > */ > for (n=2 ; n < argc ; n++) > - chmod(argv[n++], mode); > + sc = chmod(argv[n++], mode); > + _Assert_Unused_variable_unequal(sc, -1);
This one has a problem, the for loop doesn't have { }. > + > > return 0; > } > -- > 1.8.3.1 > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel