aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/troff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-01-12 15:05:40 -0500
committerRuss Cox <rsc@swtch.com>2020-01-12 15:07:42 -0500
commitfafa622a5bdf71adfbb4334541c3b65f29c89ca9 (patch)
tree189d86fb978b151ddf2f303f9c4efab196d79f17 /src/cmd/troff
parentfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (diff)
downloadplan9port-fafa622a5bdf71adfbb4334541c3b65f29c89ca9.tar.gz
plan9port-fafa622a5bdf71adfbb4334541c3b65f29c89ca9.tar.bz2
plan9port-fafa622a5bdf71adfbb4334541c3b65f29c89ca9.zip
all: fix or silence various gcc warnings
As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise.
Diffstat (limited to 'src/cmd/troff')
-rw-r--r--src/cmd/troff/t6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/troff/t6.c b/src/cmd/troff/t6.c
index 1e0dc968..3a2d8d85 100644
--- a/src/cmd/troff/t6.c
+++ b/src/cmd/troff/t6.c
@@ -723,15 +723,15 @@ setfp(int pos, int f, char *truename, int print) /* mount font f at position pos
else
strcpy(shortname, (char *) unpair(f));
if (truename && strrchr(truename, '/')) { /* .fp 1 R dir/file: use verbatim */
- sprintf(pathname, "%s", truename);
+ snprintf(pathname, NS, "%s", truename);
if (fonts[pos].truename)
free(fonts[pos].truename);
fonts[pos].truename = strdupl(truename);
} else if (truename) { /* synonym: .fp 1 R Avant */
- sprintf(pathname, "%s/dev%s/%s", fontdir, devname, truename);
+ snprintf(pathname, NS, "%s/dev%s/%s", fontdir, devname, truename);
truename = 0; /* so doesn't get repeated by ptfpcmd */
} else /* vanilla: .fp 5 XX */
- sprintf(pathname, "%s/dev%s/%s", fontdir, devname, shortname);
+ snprintf(pathname, NS, "%s/dev%s/%s", fontdir, devname, shortname);
if (truename == 0 && fonts[pos].truename != 0) {
free(fonts[pos].truename);
fonts[pos].truename = 0;