diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2025-11-18 13:21:03 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2026-02-13 20:19:58 +0000 |
| commit | fd52a9becc62f721ad6a61c7301559afaedee010 (patch) | |
| tree | b097cdfb48c97a354e56026897cc855ba58962cb | |
| parent | 08208cd694815cc855835960f55231342eb35934 (diff) | |
diff3: Use a format string to quiet a compiler warning
And bump WARNS to 2
| -rw-r--r-- | contrib/diff/src/diff3.c | 2 | ||||
| -rw-r--r-- | gnu/usr.bin/diff3/Makefile | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/diff/src/diff3.c b/contrib/diff/src/diff3.c index d0e8137756db..3062f3419865 100644 --- a/contrib/diff/src/diff3.c +++ b/contrib/diff/src/diff3.c @@ -1405,7 +1405,7 @@ output_diff3 (FILE *outputfile, struct diff3_block *diff, line = 0; do { - fprintf (outputfile, line_prefix); + fprintf (outputfile, "%s", line_prefix); cp = D_RELNUM (ptr, realfile, line); length = D_RELLEN (ptr, realfile, line); fwrite (cp, sizeof (char), length, outputfile); diff --git a/gnu/usr.bin/diff3/Makefile b/gnu/usr.bin/diff3/Makefile index 568733801a6b..8774039b5d08 100644 --- a/gnu/usr.bin/diff3/Makefile +++ b/gnu/usr.bin/diff3/Makefile @@ -17,6 +17,6 @@ CFLAGS+=-I${SRCTOP}/contrib/diff/lib CFLAGS+=-DHAVE_CONFIG_H CFLAGS+=-DDEFAULT_DIFF_PROGRAM=\"/usr/bin/diff\" -WARNS?= 0 +WARNS?= 2 .include <bsd.prog.mk> |
