Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/zic A different way of dealing with a warning from ...
details: https://anonhg.NetBSD.org/src/rev/9b513ada7e3b
branches: trunk
changeset: 785234:9b513ada7e3b
user: apb <apb%NetBSD.org@localhost>
date: Tue Mar 05 13:42:04 2013 +0000
description:
A different way of dealing with a warning from gcc-4.1 when compiling
zic.c. Instead of setting WARNS=0 and NOGCCERROR=1, just add -Wno-error
to COPTS.zic.c when using an old version of gcc.
Also include bsd.own.mk earlier.
diffstat:
usr.sbin/zic/Makefile | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (32 lines):
diff -r 5c861786b057 -r 9b513ada7e3b usr.sbin/zic/Makefile
--- a/usr.sbin/zic/Makefile Tue Mar 05 10:19:58 2013 +0000
+++ b/usr.sbin/zic/Makefile Tue Mar 05 13:42:04 2013 +0000
@@ -1,19 +1,18 @@
-# $NetBSD: Makefile,v 1.12 2013/03/05 10:19:58 martin Exp $
+# $NetBSD: Makefile,v 1.13 2013/03/05 13:42:04 apb Exp $
.include "Makefile.inc"
+.include <bsd.own.mk>
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45
COPTS.zic.c += -Wno-format-nonliteral
COPTS.scheck.c += -Wno-format-nonliteral
-.else
-# warning with older gcc:
-# "comparison is always false due to limited range of data type"
-# and no way to make it shut up?
-WARNS= 0
-NOGCCERROR= 1
-.endif
-.include <bsd.own.mk>
+.if defined(HAVE_GCC) && ${HAVE_GCC} < 45
+# gcc-4.1 says:
+# "warning: comparison is always false due to limited range of data type"
+# and there is no -Wno-foo option to suppress that warning.
+#
+COPTS.zic.c+= ${${ACTIVE_CC} == "gcc" :? -Wno-error :}
+.endif # HAVE_GCC < 45
PROG= zic
SRCS= zic.c scheck.c ialloc.c
Home |
Main Index |
Thread Index |
Old Index