[hackers] [sbase] Fix stupid GCC warning || sin
commit 9750071b9781face6140e5a2932ae5b81dec6324
Author: sin <sin_AT_2f30.org>
Date: Mon Nov 3 10:20:09 2014 +0000
Fix stupid GCC warning
tar.c:239:9: warning: missing braces around initializer [-Wmissing-braces]
I believe this is an unresolved bug in GCC.
diff --git a/tar.c b/tar.c
index 7588a41..b18eee6 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -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)
_AT_@ -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);
}
Received on Mon Nov 03 2014 - 11:21:14 CET
This archive was generated by hypermail 2.3.0
: Mon Nov 03 2014 - 11:24:19 CET