From 2cdace7e80fbb65a186b832c1b7965b881879bc5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 21 Sep 2013 15:45:51 -0500 Subject: 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. --- cpukit/libmisc/shell/main_mv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3