summaryrefslogtreecommitdiffstats
path: root/bin/mv
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2007-12-16 17:47:34 +0000
committerdds <dds@FreeBSD.org>2007-12-16 17:47:34 +0000
commit6aefba3fce090a5d9bd5fe453607870b1a7e3770 (patch)
tree0164b59d7cd4dfb4cea76b26fc2316844936598b /bin/mv
parentfa3f9f75ec14dbad14d5d7862559da36cb209135 (diff)
downloadFreeBSD-src-6aefba3fce090a5d9bd5fe453607870b1a7e3770.zip
FreeBSD-src-6aefba3fce090a5d9bd5fe453607870b1a7e3770.tar.gz
Eliminate gcc "variable clobbered" warnings by declaring the variables
living across the vfork as volatile. Noted by: kan
Diffstat (limited to 'bin/mv')
-rw-r--r--bin/mv/mv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index c2fcc8b..2e97293 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -358,7 +358,8 @@ copy(char *from, char *to)
struct stat sb;
enum clean {CLEAN_SOURCE, CLEAN_DEST, CLEAN_ODEST, CLEAN_MAX};
char *cleanup[CLEAN_MAX];
- int pid, status, rval, i;
+ int pid, status;
+ volatile int i, rval;
rval = 0;
for (i = 0; i < CLEAN_MAX; i++)
OpenPOWER on IntegriCloud