From 7f6475cec1026f66dc6cebc61670e9985b532c67 Mon Sep 17 00:00:00 2001 From: David Malone Date: Mon, 3 Dec 2001 21:00:33 +0000 Subject: [PATCH] Warns cleanups: Declare functions in advance of using them There is no printf specifies %k - I think it was supposed to be %s. --- usr.bin/ipcrm/Makefile | 1 + usr.bin/ipcrm/ipcrm.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.bin/ipcrm/Makefile b/usr.bin/ipcrm/Makefile index 9c0e45c0702c..8711c49b009e 100644 --- a/usr.bin/ipcrm/Makefile +++ b/usr.bin/ipcrm/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ PROG= ipcrm +WARNS?= 2 .include diff --git a/usr.bin/ipcrm/ipcrm.c b/usr.bin/ipcrm/ipcrm.c index b52100f632bc..7cf9dc9bdcf7 100644 --- a/usr.bin/ipcrm/ipcrm.c +++ b/usr.bin/ipcrm/ipcrm.c @@ -52,6 +52,12 @@ static const char rcsid[] = int signaled; +void usage __P((void)); +int msgrm __P((key_t, int)); +int shmrm __P((key_t, int)); +int semrm __P((key_t, int)); +void not_configured __P((int)); + void usage() { fprintf(stderr, "%s\n%s\n", @@ -98,7 +104,7 @@ int semrm(key, id) return semctl(id, 0, IPC_RMID, arg); } -void not_configured() +void not_configured(int signo __unused) { signaled++; } @@ -153,7 +159,7 @@ int main(argc, argv) if (result < 0) { errflg++; if (!signaled) - warn("%key(%ld): ", IPC_TO_STR(c), target_key); + warn("%ss(%ld): ", IPC_TO_STR(c), target_key); else warnx("%ss are not configured in the running kernel", IPC_TO_STRING(c));