summaryrefslogtreecommitdiffstats
path: root/src/cmd/tbl/t8.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2025-07-24 14:22:18 +0000
committerDan Cross <cross@gajendra.net>2025-07-24 15:45:31 +0000
commit4089e29e89026f0b581155987d5f683d7635fd13 (patch)
tree168b0306e87f3a7c1c42f81e656cf0054add7371 /src/cmd/tbl/t8.c
parent564d45b5a55adeb48f69fdecb2bf4ed1f909850b (diff)
downloadplan9port-4089e29e89026f0b581155987d5f683d7635fd13.tar.gz
plan9port-4089e29e89026f0b581155987d5f683d7635fd13.zip
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.
Diffstat (limited to 'src/cmd/tbl/t8.c')
-rw-r--r--src/cmd/tbl/t8.c2
1 files changed, 1 insertions, 1 deletions
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;