From d0e5eb6a35478059626d2eb48785f1fbb821a122 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 18 Dec 2006 20:11:10 +0000 Subject: [PATCH] from Anon Ymous: Remove a "(void)&" construction: iop is used by the parent and always set after the vfork(). Also flag some parameters __unused so this will compile with -Wextra. --- usr.sbin/cron/cron.c | 8 ++++---- usr.sbin/cron/do_command.c | 10 +++++++--- usr.sbin/cron/popen.c | 8 ++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.sbin/cron/cron.c b/usr.sbin/cron/cron.c index b4d6b5b15224..e5095f3d9b3f 100644 --- a/usr.sbin/cron/cron.c +++ b/usr.sbin/cron/cron.c @@ -1,4 +1,4 @@ -/* $NetBSD: cron.c,v 1.12 2006/05/21 19:26:43 christos Exp $ */ +/* $NetBSD: cron.c,v 1.13 2006/12/18 20:11:10 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -22,7 +22,7 @@ #if 0 static char rcsid[] = "Id: cron.c,v 2.11 1994/01/15 20:43:43 vixie Exp"; #else -__RCSID("$NetBSD: cron.c,v 1.12 2006/05/21 19:26:43 christos Exp $"); +__RCSID("$NetBSD: cron.c,v 1.13 2006/12/18 20:11:10 christos Exp $"); #endif #endif @@ -259,7 +259,7 @@ cron_sleep(void) { #ifdef USE_SIGCHLD static void -sigchld_handler(int x) +sigchld_handler(int x __unused) { WAIT_T waiter; PID_T pid; @@ -290,7 +290,7 @@ sigchld_handler(int x) static void -sighup_handler(int x) +sighup_handler(int x __unused) { log_close(); } diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c index 88823e9fdc68..4be0774c25d3 100644 --- a/usr.sbin/cron/do_command.c +++ b/usr.sbin/cron/do_command.c @@ -1,4 +1,4 @@ -/* $NetBSD: do_command.c,v 1.24 2006/10/22 21:00:21 christos Exp $ */ +/* $NetBSD: do_command.c,v 1.25 2006/12/18 20:11:10 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -22,7 +22,7 @@ #if 0 static char rcsid[] = "Id: do_command.c,v 2.12 1994/01/15 20:43:43 vixie Exp "; #else -__RCSID("$NetBSD: do_command.c,v 1.24 2006/10/22 21:00:21 christos Exp $"); +__RCSID("$NetBSD: do_command.c,v 1.25 2006/12/18 20:11:10 christos Exp $"); #endif #endif @@ -523,7 +523,11 @@ child_process(entry *e, user *u) static void -do_univ(user *u) +do_univ(user *u +#ifndef sequent + __unused +#endif +) { #if defined(sequent) /* Dynix (Sequent) hack to put the user associated with diff --git a/usr.sbin/cron/popen.c b/usr.sbin/cron/popen.c index 78bdf2daeed7..b09c5928b295 100644 --- a/usr.sbin/cron/popen.c +++ b/usr.sbin/cron/popen.c @@ -1,4 +1,4 @@ -/* $NetBSD: popen.c,v 1.10 2005/07/31 17:52:01 christos Exp $ */ +/* $NetBSD: popen.c,v 1.11 2006/12/18 20:11:10 christos Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -36,7 +36,7 @@ static char rcsid[] = "Id: popen.c,v 1.5 1994/01/15 20:43:43 vixie Exp"; static char sccsid[] = "@(#)popen.c 5.7 (Berkeley) 2/14/89"; #else -__RCSID("$NetBSD: popen.c,v 1.10 2005/07/31 17:52:01 christos Exp $"); +__RCSID("$NetBSD: popen.c,v 1.11 2006/12/18 20:11:10 christos Exp $"); #endif #endif /* not lint */ @@ -62,10 +62,6 @@ cron_popen(char *program, const char *type) PID_T pid; char *argv[MAX_ARGS]; -#ifdef __GNUC__ - (void) &iop; /* Avoid vfork clobbering */ -#endif - if ((*type != 'r' && *type != 'w') || type[1]) return(NULL);