diff options
author | Diomidis Spinellis <dds@FreeBSD.org> | 2007-12-16 17:47:34 +0000 |
---|---|---|
committer | Diomidis Spinellis <dds@FreeBSD.org> | 2007-12-16 17:47:34 +0000 |
commit | 2ec43f35f4d8dfa8113c2549a38862f9fbc095ad (patch) | |
tree | 0164b59d7cd4dfb4cea76b26fc2316844936598b /bin/mv | |
parent | 3bd3bd76b51d9b70b181e4db90aaf9c4dafef235 (diff) | |
download | src-2ec43f35f4d8dfa8113c2549a38862f9fbc095ad.tar.gz src-2ec43f35f4d8dfa8113c2549a38862f9fbc095ad.zip |
Eliminate gcc "variable clobbered" warnings by declaring the variables
living across the vfork as volatile.
Noted by: kan
Notes
Notes:
svn path=/head/; revision=174667
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/mv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index c2fcc8b414e1..2e972931c68b 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++) |