summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-21 12:59:10 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-21 12:59:10 +0000
commit2e2449b98ca52b5e8ba2e24a7e48d02467e0ec67 (patch)
tree43fbb701d41c1fcca509640971e16df72613919b /usr.sbin
parentc6e729cad2010e9c2f2bced0fc69d60dbf8ff2f4 (diff)
Add more compile time checking; fix one warning reported by gcc.
From: Nicholas Marriott <nicholas.marriott@gmail.com>
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/makemap.c5
-rw-r--r--usr.sbin/smtpd/makemap/Makefile8
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c
index 59c46f0cf2f..27e4e3cb160 100644
--- a/usr.sbin/smtpd/makemap.c
+++ b/usr.sbin/smtpd/makemap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makemap.c,v 1.5 2008/12/18 15:19:33 jacekm Exp $ */
+/* $OpenBSD: makemap.c,v 1.6 2008/12/21 12:59:05 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -200,8 +200,7 @@ parse_entry(char *line, size_t len, size_t lineno)
key.data = name;
key.size = strlen(name) + 1;
if (db->get(db, &key, &val, 0) == 0) {
- warnx("%s:%zd: duplicate entry for %s", source, lineno,
- key.data);
+ warnx("%s:%zd: duplicate entry for %s", source, lineno, name);
return 0;
}
diff --git a/usr.sbin/smtpd/makemap/Makefile b/usr.sbin/smtpd/makemap/Makefile
index 052439431f1..c25ddcc7931 100644
--- a/usr.sbin/smtpd/makemap/Makefile
+++ b/usr.sbin/smtpd/makemap/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.3 2008/12/17 22:59:39 jacekm Exp $
+# $OpenBSD: Makefile,v 1.4 2008/12/21 12:59:09 jacekm Exp $
.PATH: ${.CURDIR}/..
@@ -10,6 +10,12 @@ BINMODE?=555
BINDIR= /usr/bin
MAN= makemap.8
+CFLAGS+= -g3 -ggdb -I${.CURDIR}/..
+CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS+= -Wmissing-declarations
+CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual
+CFLAGS+= -Wsign-compare -Wbounded
+
LINKS= ${BINDIR}/makemap ${BINDIR}/newaliases
MLINKS= makemap.8 newaliases.8