diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-21 15:45:51 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-09-21 15:45:51 -0500 |
commit | 2cdace7e80fbb65a186b832c1b7965b881879bc5 (patch) | |
tree | e3bc30ec57bb86ea006726954faa7c7772c764a4 | |
parent | mouse_parser.c: Fix warning by properly checking return code (diff) | |
download | rtems-2cdace7e80fbb65a186b832c1b7965b881879bc5.tar.bz2 |
main_mv.c: Address set but not used warning
It looks like the paths that use tval are if 0'ed for RTEMS.
Making all conditional on __rtems__ including the declaration.
-rw-r--r-- | cpukit/libmisc/shell/main_mv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/main_mv.c b/cpukit/libmisc/shell/main_mv.c index 7e3db0fb0e..ed5de3fbba 100644 --- a/cpukit/libmisc/shell/main_mv.c +++ b/cpukit/libmisc/shell/main_mv.c @@ -325,7 +325,9 @@ do_move_mv(rtems_shell_mv_globals* globals, char *from, char *to) int fastcopy_mv(rtems_shell_mv_globals* globals, char *from, char *to, struct stat *sbp) { +#ifndef __rtems__ struct timeval tval[2]; +#endif uint32_t blen; static char *bp; int nread, from_fd, to_fd; @@ -366,6 +368,7 @@ err: if (unlink(to)) (void)free(bp); (void)close(from_fd); +#ifndef __rtems__ #ifdef xBSD4_4 TIMESPEC_TO_TIMEVAL(&tval[0], &sbp->st_atimespec); TIMESPEC_TO_TIMEVAL(&tval[1], &sbp->st_mtimespec); @@ -375,7 +378,8 @@ err: if (unlink(to)) tval[0].tv_usec = 0; tval[1].tv_usec = 0; #endif -#if 0 +#endif +#ifndef __rtems__ #ifdef _SRV5 if (utimes(to, tval)) #else |