main_cp.c: Ignore return value from stat()

CID 26051: Unchecked return value from library in main_cp().

Closes #4365
This commit is contained in:
Ryan Long
2021-03-25 10:10:39 -04:00
committed by Joel Sherrill
parent a187b09228
commit f29b312ea4

View File

@@ -255,8 +255,14 @@ main_cp(rtems_shell_cp_globals* cp_globals, int argc, char *argv[])
*/
if (r == -1) {
if (Rflag && (Lflag || Hflag))
#ifdef __rtems__
(void)
#endif
stat(*argv, &tmp_stat);
else
#ifdef __rtems__
(void)
#endif
lstat(*argv, &tmp_stat);
if (S_ISDIR(tmp_stat.st_mode) && Rflag)