From 4089e29e89026f0b581155987d5f683d7635fd13 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Thu, 24 Jul 2025 14:22:18 +0000 Subject: warnings: fix warnings on newer compilers Mostly turning the crank on fixing simple warnings: arrays, for instance, can never be nil. A couple of pointers should have been initialized to `nil` before being tested. Some logic in `troff` was simplified: basically, an `if` statement had a condition that must have always been true if that section of code were being executed at all. --- src/cmd/tbl/t8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/tbl') diff --git a/src/cmd/tbl/t8.c b/src/cmd/tbl/t8.c index 26375df5..f3d72775 100644 --- a/src/cmd/tbl/t8.c +++ b/src/cmd/tbl/t8.c @@ -71,7 +71,7 @@ putline(int i, int nl) ss = table[nl][c].col; if (ss == 0) continue; - if(font[c][stynum[nl]]) + if(c < MAXHEAD && 0 <= nl && nl < 2) chfont = 1; if (point(ss) ) continue; -- cgit v1.2.3