From owner-svn-src-head@FreeBSD.ORG Sun May 16 13:14:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27EF8106566C; Sun, 16 May 2010 13:14:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 941D58FC17; Sun, 16 May 2010 13:14:01 +0000 (UTC) Received: from c122-106-169-155.carlnfd1.nsw.optusnet.com.au (c122-106-169-155.carlnfd1.nsw.optusnet.com.au [122.106.169.155]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o4GDDvnS026996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 May 2010 23:13:59 +1000 Date: Sun, 16 May 2010 23:13:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ulrich Spoerlein In-Reply-To: <201005141426.o4EEQu7B081269@svn.freebsd.org> Message-ID: <20100516230149.V8088@delplex.bde.org> References: <201005141426.o4EEQu7B081269@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r208075 - in head/usr.sbin/apmd: . contrib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 13:14:02 -0000 On Fri, 14 May 2010, Ulrich Spoerlein wrote: > Log: > Sync apmd(8) with DragonflyBSD, bringing WARNS to 3 > > Reviewed by: ed (partial, long time ago) > ... > Modified: head/usr.sbin/apmd/apmd.c > ============================================================================== > --- head/usr.sbin/apmd/apmd.c Fri May 14 14:26:49 2010 (r208074) > +++ head/usr.sbin/apmd/apmd.c Fri May 14 14:26:56 2010 (r208075) > @@ -52,8 +52,6 @@ static const char rcsid[] = > ... > - execl(_PATH_BSHELL, "sh", "-c", p->line, (char *)NULL); > + execl(_PATH_BSHELL, "sh", "-c", p->line, NULL); execl() takes variadic args, so removing this cast adds a bug. > @@ -315,7 +313,7 @@ exec_event_cmd(struct event_config *ev) > status = exec_run_cmd(ev->cmdlist); > if (status && ev->rejectable) { > syslog(LOG_ERR, "canceled"); > - (void) event_cmd_reject_act(NULL); > + event_cmd_reject_act(NULL); Removing this cast is not as correct as removing the ones for the err() family, since the function returns non-void. > @@ -674,7 +672,7 @@ main(int ac, char* av[]) > daemon(0, 0); > > #ifdef NICE_INCR > - (void) nice(NICE_INCR); > + nice(NICE_INCR); > #endif Removing this cast is probably correct, since it is probably wrong to not check for errors and wronger to cast away the warning (from lint) about this. The bug of not checking for errors remains. Bruce