ctlstat not building with clang

Dan McGregor danismostlikely at gmail.com
Thu Jan 12 21:27:48 UTC 2012

Building world with clang now (as of r229997) no longer compiles because
ctlstat was imported into the tree.  The error is:

clang -O2 -pipe  -I/usr/src/usr.bin/ctlstat/../../sys -std=gnu99
-fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
-Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs
-Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c
/usr/src/usr.bin/ctlstat/ctlstat.c:149:35: error: format string is not a
string literal (potentially insecure)
        fprintf(error ? stderr : stdout, ctlstat_usage);
1 error generated.
*** Error code 1

Stop in /usr/src/usr.bin/ctlstat

How do people feel about the attached patch that turns a call to fprintf to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctlstat.patch
Type: text/x-diff
Size: 332 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120112/1a90d3e0/ctlstat.bin

More information about the freebsd-current mailing list