Author: pfg Date: Sun Jan 28 19:37:30 2018 New Revision: 328517 URL: https://svnweb.freebsd.org/changeset/base/328517
Log: Avoid implicit gcc nonnull attribute in vwarnx(). We removed the nonnull attributes from our headers long ago, but still __printflike() includes it implicitly. This will cause the NULL check to be optimized away in higher -O levels and it will also trigger a -Wnonnull-compare warning. Avoid warning with it in vwarnx(). Obtained from: DragonfLyBSD (git 6329e2f68af73662a1960240675e796ab586bcb1) Modified: head/include/err.h Modified: head/include/err.h ============================================================================== --- head/include/err.h Sun Jan 28 19:18:40 2018 (r328516) +++ head/include/err.h Sun Jan 28 19:37:30 2018 (r328517) @@ -60,7 +60,7 @@ void vwarn(const char *, __va_list) __printf0like(1, 0 void warnc(int, const char *, ...) __printf0like(2, 3); void vwarnc(int, const char *, __va_list) __printf0like(2, 0); void warnx(const char *, ...) __printflike(1, 2); -void vwarnx(const char *, __va_list) __printflike(1, 0); +void vwarnx(const char *, __va_list) __printf0like(1, 0); void err_set_file(void *); void err_set_exit(void (* _Nullable)(int)); __END_DECLS _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"