aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-22 12:56:10 -0500
committerRob Landley <rob@landley.net>2019-03-22 12:56:10 -0500
commit04d4f92f6292cd02c8ddc21424749641545be553 (patch)
treed44e194c4abc5845bdda821d014d5501b6e85393
parente1582232c388d5fe6ccb76818162013d632de551 (diff)
downloadtoybox-04d4f92f6292cd02c8ddc21424749641545be553.tar.gz
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.)
-rw-r--r--toys/pending/tar.c7
1 files 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);