From 04d4f92f6292cd02c8ddc21424749641545be553 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 22 Mar 2019 12:56:10 -0500 Subject: Silence stupid, pointless warnings. Two "is never used uninitialized" and one "we don't trust you to get clearly documented operator precedence right". (The compiler may not "suggest". Every time I go "abc && def || exit 1" in the shell it means I know the operator precedence _and_ the short-circuit rules, which are the same as C here. This is a warning aimed at C++ developers, it should not be enabled for C.) --- toys/pending/tar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/toys/pending/tar.c b/toys/pending/tar.c index f8233fa6..d0d840ba 100644 --- a/toys/pending/tar.c +++ b/toys/pending/tar.c @@ -189,8 +189,8 @@ static void alloread(void *buf, int len) static void add_file(char **nam, struct stat *st) { struct tar_hdr hdr; - struct passwd *pw; - struct group *gr; + struct passwd *pw = pw; + struct group *gr = gr; struct inode_list *node = node; int i, fd =-1; char *c, *p, *name = *nam, *lnk, *hname; @@ -534,7 +534,8 @@ static void unpack_tar(void) } // Skip excluded files - if (filter(TT.excl, TT.hdr.name) || TT.incl && !delete) skippy(TT.hdr.size); + if (filter(TT.excl, TT.hdr.name) || (TT.incl && !delete)) + skippy(TT.hdr.size); else if (FLAG(t)) { if (FLAG(v)) { struct tm *lc = localtime(&TT.hdr.mtime); -- cgit v1.2.3