From 7c2cd0059f46396427902ef62f11257e86fee985 Mon Sep 17 00:00:00 2001 From: billf Date: Sun, 12 Dec 1999 02:29:54 +0000 Subject: -Wall cleanup. --- games/quiz/quiz.c | 9 +++++---- games/quiz/rxp.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c index 9c4f00f..1c26272 100644 --- a/games/quiz/quiz.c +++ b/games/quiz/quiz.c @@ -171,7 +171,7 @@ show_index() for (s = next_cat(qp->q_text); s; s = next_cat(s)) { if (!rxp_compile(s)) err("%s", rxperr); - if (p = rxp_expand()) + if ((p = rxp_expand()) != '\0') (void)fprintf(pf, "%s ", p); } (void)fprintf(pf, "\n"); @@ -321,12 +321,13 @@ appdstr(s, tp, len) size_t len; { char *mp, *sp; - int ch; char *m; if ((m = malloc(strlen(s) + len + 1)) == NULL) err("%s", strerror(errno)); - for (mp = m, sp = s; *mp++ = *sp++;); + mp = m; + sp = s; + for (; (*mp++ = *sp++);); mp--; if (*(mp - 1) == '\\') @@ -356,7 +357,7 @@ downcase(p) { int ch; - for (; ch = *p; ++p) + for (; (ch = *p); ++p) if (isascii(ch) && isupper(ch)) *p = tolower(ch); } diff --git a/games/quiz/rxp.c b/games/quiz/rxp.c index 8addbef..69ac7c7 100644 --- a/games/quiz/rxp.c +++ b/games/quiz/rxp.c @@ -212,6 +212,7 @@ rxp__match(s, first, j_succ, j_fail, sp_fail) Rxp_t *grp_end; int err; + grp_end = NULL; if (first) { rp = rxpbuf; sp = s; -- cgit v1.1