From 9750071b9781face6140e5a2932ae5b81dec6324 Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 3 Nov 2014 10:20:09 +0000 Subject: [PATCH] Fix stupid GCC warning tar.c:239:9: warning: missing braces around initializer [-Wmissing-braces] I believe this is an unresolved bug in GCC. --- tar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tar.c b/tar.c index 7588a41..b18eee6 100644 --- 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); }