[rtems commit] main_mv.c: Address set but not used warning
Joel Sherrill
joel at rtems.org
Sat Sep 21 21:19:51 UTC 2013
Module: rtems
Branch: master
Commit: 2cdace7e80fbb65a186b832c1b7965b881879bc5
Changeset: http://git.rtems.org/rtems/commit/?id=2cdace7e80fbb65a186b832c1b7965b881879bc5
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Sat Sep 21 15:45:51 2013 -0500
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 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/cpukit/libmisc/shell/main_mv.c b/cpukit/libmisc/shell/main_mv.c
index 7e3db0f..ed5de3f 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
More information about the vc
mailing list