sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 9750071b9781face6140e5a2932ae5b81dec6324
parent b03b2b1d5d42ca8882a169c9ccecdfcc6e9c522c
Author: sin <sin@2f30.org>
Date:   Mon,  3 Nov 2014 10:20:09 +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.

Diffstat:
Mtar.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tar.c b/tar.c @@ -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); }