summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/_getpw.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-06-21 10:00:58 -0700
committerOri Bernstein <ori@eigenstate.org>2019-06-21 10:00:58 -0700
commitd4bc9052beb3305d64a353a16641740380eb87af (patch)
treee90babcf3b3b295d9ad218cbf8f4e852df7e6d89 /sys/src/ape/lib/ap/plan9/_getpw.c
parent0af7d1fe35093690f2d8dd0613b3bf3b777674c6 (diff)
Turn on warnings when building libap.
For ape, we never enabled warnings in cflags. Turning it on brings up a lot of warnings. Most are noise, but a few caught unused variables and trunctaions of pointers. to smaller integers (int, long). A few warnings remain.
Diffstat (limited to 'sys/src/ape/lib/ap/plan9/_getpw.c')
-rw-r--r--sys/src/ape/lib/ap/plan9/_getpw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/ape/lib/ap/plan9/_getpw.c b/sys/src/ape/lib/ap/plan9/_getpw.c
index 2c6a740a7..c75f1dbfe 100644
--- a/sys/src/ape/lib/ap/plan9/_getpw.c
+++ b/sys/src/ape/lib/ap/plan9/_getpw.c
@@ -59,6 +59,7 @@ _getpw(int *pnum, char **pname, char **plist)
return 0;
au[n] = 0;
}
+ mem = nil;
matchnum = (*pname == NULL);
matched = 0;
/* try using memo */
@@ -68,9 +69,8 @@ _getpw(int *pnum, char **pname, char **plist)
matched = (mem->num == *pnum);
else
matched = (strcmp(mem->name, *pname) == 0);
- if(matched) {
+ if(matched)
break;
- }
}
if(!matched)
for(f1 = au, eline = au; !matched && *eline; f1 = eline+1){