Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gcc47 warnings: A few more fixes

usr.bin/make		pass -fno-address, NO_WERROR=true
usr.bin/monitor		modified source file
usr.bin/netstat		modified source file (2)
usr.bin/sdpquery	WARNS=2, pass -fno-unused-but-set-variable

Make has several evaluations that gcc47 believes will always
(without exception) evaluate to true or false.  Likely gcc47 is not
detecting some cases correctly, so -Wno-address was passed to it.
However, -Werror overrides it, so NO_WERROR had to be set on this
Makefile.

The remaining GCC warnings will be left for swildner to handle.
The -Werror flag will be suppress for GCC47 until further notice.
  • Loading branch information...
commit eed9e955cd3447c8c1d62233f093f19e2a0aa68d 1 parent 7203631
John Marino authored
View
4 usr.bin/make/Makefile
@@ -10,6 +10,10 @@ SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c \
lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c \
util.c var.c
+# For arch.c:400 "evaluation always false" error which seems misdetected
+NO_WERROR= yes
+CFLAGS+= -Wno-address
+
NOSHARED?= YES
CFLAGS+=-DMAKE_VERSION=\"5200408120\"
View
2  usr.bin/monitor/monitor.c
@@ -122,7 +122,7 @@ monitor_add(const char *path)
{
monitor_elm_t elm;
struct kevent kev;
- int n;
+ int __unused n;
elm = malloc(sizeof(*elm));
bzero(elm, sizeof(*elm));
View
2  usr.bin/netstat/if.c
@@ -118,7 +118,6 @@ intpr(int interval1, u_long ifnetaddr, void (*pfunc)(char *))
u_long ifaddraddr;
u_long ifaddrcont_addr;
u_long ifaddrfound;
- u_long ifnetfound;
u_long opackets;
u_long ipackets;
u_long obytes;
@@ -177,7 +176,6 @@ intpr(int interval1, u_long ifnetaddr, void (*pfunc)(char *))
if (ifaddraddr == 0) {
struct ifaddrhead head;
- ifnetfound = ifnetaddr;
if (kread(ifnetaddr, (char *)&ifnet, sizeof ifnet))
return;
strlcpy(name, ifnet.if_xname, sizeof(name));
View
3  usr.bin/netstat/route.c
@@ -1144,11 +1144,8 @@ ipx_phost(struct sockaddr *sa)
struct sockaddr_ipx work;
static union ipx_net ipx_zeronet;
char *p;
- struct ipx_addr in;
work = *sipx;
- in = work.sipx_addr;
-
work.sipx_addr.x_port = 0;
work.sipx_addr.x_net = ipx_zeronet;
p = ipx_print((struct sockaddr *)&work);
View
5 usr.bin/sdpquery/Makefile
@@ -1,5 +1,4 @@
# $NetBSD: Makefile,v 1.3 2007/05/28 12:06:31 tls Exp $
-# $DragonFly: src/usr.bin/sdpquery/Makefile,v 1.1 2008/02/08 14:06:25 hasso Exp $
PROG= sdpquery
MAN= sdpquery.1
@@ -9,4 +8,8 @@ CFLAGS+= -I${.CURDIR}/../../sys
DPADD+= ${LIBBLUETOOTH} ${LIBSDP}
LDADD+= -lbluetooth -lsdp
+# suppress cast-qual errors
+WARNS?= 3
+CFLAGS+= -Wno-unused-but-set-variable
+
.include <bsd.prog.mk>
Please sign in to comment.
Something went wrong with that request. Please try again.