[rtems commit] main_cp.c: Ignore return value from stat()
Joel Sherrill
joel at rtems.org
Fri May 28 17:29:36 UTC 2021
Module: rtems
Branch: master
Commit: f29b312ea4bcfe063d5fa443138df4508103fd82
Changeset: http://git.rtems.org/rtems/commit/?id=f29b312ea4bcfe063d5fa443138df4508103fd82
Author: Ryan Long <ryan.long at oarcorp.com>
Date: Thu Mar 25 10:10:39 2021 -0400
main_cp.c: Ignore return value from stat()
CID 26051: Unchecked return value from library in main_cp().
Closes #4365
---
cpukit/libmisc/shell/main_cp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cpukit/libmisc/shell/main_cp.c b/cpukit/libmisc/shell/main_cp.c
index 913ece1..bbadb51 100644
--- a/cpukit/libmisc/shell/main_cp.c
+++ b/cpukit/libmisc/shell/main_cp.c
@@ -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)
More information about the vc
mailing list