Fix stupid GCC warning
tar.c:239:9: warning: missing braces around initializer [-Wmissing-braces] I believe this is an unresolved bug in GCC.
This commit is contained in:
parent
b03b2b1d5d
commit
9750071b97
3
tar.c
3
tar.c
|
@ -236,7 +236,7 @@ unarchive(char *fname, int l, char b[Blksiz])
|
||||||
char lname[101];
|
char lname[101];
|
||||||
FILE *f = NULL;
|
FILE *f = NULL;
|
||||||
unsigned long mode, major, minor, type, mtime;
|
unsigned long mode, major, minor, type, mtime;
|
||||||
struct timeval times[2] = {0};
|
struct timeval times[2];
|
||||||
Header *h = (void*)b;
|
Header *h = (void*)b;
|
||||||
|
|
||||||
if(!mflag)
|
if(!mflag)
|
||||||
|
@ -293,6 +293,7 @@ unarchive(char *fname, int l, char b[Blksiz])
|
||||||
|
|
||||||
if(!mflag) {
|
if(!mflag) {
|
||||||
times[0].tv_sec = times[1].tv_sec = mtime;
|
times[0].tv_sec = times[1].tv_sec = mtime;
|
||||||
|
times[0].tv_usec = times[1].tv_usec = 0;
|
||||||
if(utimes(fname, times))
|
if(utimes(fname, times))
|
||||||
perror(fname);
|
perror(fname);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user