diff options
author | Ori Bernstein <ori@eigenstate.org> | 2019-06-21 10:00:58 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2019-06-21 10:00:58 -0700 |
commit | d4bc9052beb3305d64a353a16641740380eb87af (patch) | |
tree | e90babcf3b3b295d9ad218cbf8f4e852df7e6d89 /sys/src/ape/lib/ap/gen/strstr.c | |
parent | 0af7d1fe35093690f2d8dd0613b3bf3b777674c6 (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/gen/strstr.c')
-rw-r--r-- | sys/src/ape/lib/ap/gen/strstr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/ape/lib/ap/gen/strstr.c b/sys/src/ape/lib/ap/gen/strstr.c index 4e6828571..520f992b8 100644 --- a/sys/src/ape/lib/ap/gen/strstr.c +++ b/sys/src/ape/lib/ap/gen/strstr.c @@ -2,19 +2,19 @@ /* Return pointer to first occurrence of s2 in s1, NULL if none */ -char -*strstr(const char *s1, const char *s2) +char* +strstr(const char *s1, const char *s2) { char *p, *pa, *pb; int c0, c; c0 = *s2; if(c0 == 0) - return s1; + return (char *)s1; s2++; for(p=strchr(s1, c0); p; p=strchr(p+1, c0)) { pa = p; - for(pb=s2;; pb++) { + for(pb=(char*)s2;; pb++) { c = *pb; if(c == 0) return p; |