From owner-svn-src-head@freebsd.org Sun Jan 28 19:37:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86949EDB1EC; Sun, 28 Jan 2018 19:37:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CBA66B611; Sun, 28 Jan 2018 19:37:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 378501DF3D; Sun, 28 Jan 2018 19:37:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0SJbUwv096055; Sun, 28 Jan 2018 19:37:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0SJbU18096054; Sun, 28 Jan 2018 19:37:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801281937.w0SJbU18096054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 28 Jan 2018 19:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328517 - head/include X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 328517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jan 2018 19:37:31 -0000 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