From 477eae335f9e589e862749b2dc04a047aae56345 Mon Sep 17 00:00:00 2001 From: Justin Flude Date: Sun, 30 Jan 2022 15:40:58 -0600 Subject: [PATCH] Fix bs & quiz error, dab warning on macOS 10.15.7 (and perhaps later) --- bs/bs.c | 2 +- dab/player.h | 1 + quiz/quiz.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bs/bs.c b/bs/bs.c index 98c25fd..0c6df74 100644 --- a/bs/bs.c +++ b/bs/bs.c @@ -191,7 +191,7 @@ intro(void) if(signal(SIGQUIT,SIG_IGN) != SIG_IGN) signal(SIGQUIT,sighandler); - if(tmpname != '\0') { + if(tmpname != NULL) { strcpy(name,tmpname); name[0] = toupper(name[0]); } else { diff --git a/dab/player.h b/dab/player.h index 514b9b7..7233d2a 100644 --- a/dab/player.h +++ b/dab/player.h @@ -49,6 +49,7 @@ class BOARD; class PLAYER { public: PLAYER(char who); + virtual ~PLAYER() {} virtual void play(const BOARD& b, size_t& y, size_t& x, int& dir) = 0; // Helper functions diff --git a/quiz/quiz.c b/quiz/quiz.c index a98d19f..693cadf 100644 --- a/quiz/quiz.c +++ b/quiz/quiz.c @@ -155,7 +155,7 @@ show_index(void) for (s = next_cat(qp->q_text); s; s = next_cat(s)) { if (!rxp_compile(s)) err("%s", rxperr); - if ((p = rxp_expand()) != '\0') + if ((p = rxp_expand()) != NULL) (void)fprintf(pf, "%s ", p); } (void)fprintf(pf, "\n");