Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jan 2018 19:37:30 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328517 - head/include
Message-ID:  <201801281937.w0SJbU18096054@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801281937.w0SJbU18096054>