ctlstat not building with clang

看板FB_current作者時間14年前 (2012/01/13 05:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
--f46d0442829c202fe804b65b059a Content-Type: text/plain; charset=ISO-8859-1 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 /usr/src/usr.bin/ctlstat/ctlstat.c:149:35: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] 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 fputs? --f46d0442829c202fe804b65b059a Content-Type: text/x-diff; charset=US-ASCII; name="ctlstat.patch" Content-Disposition: attachment; filename="ctlstat.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxc9edo40 SW5kZXg6IGN0bHN0YXQuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjdGxzdGF0LmMgICAocmV2aXNpb24gMjMw MDI2KQorKysgY3Rsc3RhdC5jICAgKHdvcmtpbmcgY29weSkKQEAgLTE0Niw3ICsxNDYsNyBAQAog c3RhdGljIHZvaWQKIHVzYWdlKGludCBlcnJvcikKIHsKLSAgICAgICBmcHJpbnRmKGVycm9yID8g c3RkZXJyIDogc3Rkb3V0LCBjdGxzdGF0X3VzYWdlKTsKKyAgICAgICBmcHV0cyhjdGxzdGF0X3Vz YWdlLCBlcnJvciA/IHN0ZGVyciA6IHN0ZG91dCk7CiB9CiAKIHN0YXRpYyBpbnQK --f46d0442829c202fe804b65b059a Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --f46d0442829c202fe804b65b059a--
文章代碼(AID): #1F3r5Ikl (FB_current)
文章代碼(AID): #1F3r5Ikl (FB_current)