introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
This commit is contained in:
mrg 2019-10-13 07:28:04 +00:00
parent 1d0ae2845f
commit e469d4c46d
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.20 2014/07/27 04:38:03 dholland Exp $
# $NetBSD: Makefile,v 1.21 2019/10/13 07:28:19 mrg Exp $
LIBISPRIVATE= yes
@ -21,3 +21,5 @@ version.c: VERSION
.include <bsd.lib.mk>
COPTS.print.c+= -Wno-pointer-sign
COPTS.pf.c+= ${GCC_NO_STRINGOP_TRUNCATION}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.12 2012/08/10 12:10:29 joerg Exp $
# $NetBSD: Makefile,v 1.13 2019/10/13 07:28:19 mrg Exp $
PROG= mopd
SRCS= mopd.c process.c
@ -9,4 +9,4 @@ DPADD+= ${LIBUTIL}
.include <bsd.prog.mk>
COPTS.process.c+= -Wno-pointer-sign
COPTS.process.c+= -Wno-pointer-sign ${GCC_NO_FORMAT_TRUNCATION}