Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi/usr.bin/nvi - Add -Wno-unused and -Wno-unse...



details:   https://anonhg.NetBSD.org/src/rev/d52710e92b25
branches:  trunk
changeset: 357492:d52710e92b25
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Nov 13 02:33:13 2017 +0000

description:
- Add -Wno-unused and -Wno-unsequenced for gcc and clang, respectively.
  This is because encoding conversion macros yield such like:

    #define FILE2INT5(sp,buf,n,nlen,w,wlen) (w = n, wlen = nlen, 0)

- Silence gcc warnings on nonliteral arguments for snprintf(3) in v_increment.c,
  that are overlooked for swprintf(3) in the case of USE_WIDECHAR == "yes".

diffstat:

 external/bsd/nvi/usr.bin/nvi/Makefile |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r a02d3bc3fdc1 -r d52710e92b25 external/bsd/nvi/usr.bin/nvi/Makefile
--- a/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 13 02:12:29 2017 +0000
+++ b/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 13 02:33:13 2017 +0000
@@ -1,10 +1,17 @@
-#      $NetBSD: Makefile,v 1.10 2017/11/13 01:51:47 rin Exp $
+#      $NetBSD: Makefile,v 1.11 2017/11/13 02:33:13 rin Exp $
 
 .include <bsd.own.mk>
 
 USE_WIDECHAR?=yes
 
 CWARNFLAGS.clang+=     -Wno-uninitialized -Wno-format-security
+.if ${USE_WIDECHAR} != "yes"
+CWARNFLAGS.gcc+=       -Wno-unused
+CWARNFLAGS.clang+=     -Wno-unsequenced
+ .ifdef HAVE_GCC
+COPTS.v_increment.c+=  -Wno-format-nonliteral
+ .endif
+.endif
 
 CPPFLAGS+=-I${DIST}/include -I${.CURDIR} -I. -DGTAGS
 CPPFLAGS+=-DHAVE_OPENPTY -DHAVE_UTIL_H



Home | Main Index | Thread Index | Old Index