Eliminate gcc "variable clobbered" warnings by declaring the variables

living across the vfork as volatile.

Noted by:	kan
This commit is contained in:
Diomidis Spinellis 2007-12-16 17:47:34 +00:00
parent 3bd3bd76b5
commit 2ec43f35f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174667

View File

@ -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++)