1
0
mirror of git://git.suckless.org/sbase synced 2024-12-29 02:22:27 +00:00

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:
sin 2014-11-03 10:20:09 +00:00
parent b03b2b1d5d
commit 9750071b97

3
tar.c
View File

@ -236,7 +236,7 @@ unarchive(char *fname, int l, char b[Blksiz])
char lname[101];
FILE *f = NULL;
unsigned long mode, major, minor, type, mtime;
struct timeval times[2] = {0};
struct timeval times[2];
Header *h = (void*)b;
if(!mflag)
@ -293,6 +293,7 @@ unarchive(char *fname, int l, char b[Blksiz])
if(!mflag) {
times[0].tv_sec = times[1].tv_sec = mtime;
times[0].tv_usec = times[1].tv_usec = 0;
if(utimes(fname, times))
perror(fname);
}