Date: Sun, 16 May 2010 23:13:57 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Ulrich Spoerlein <uqs@freebsd.org> 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 Message-ID: <20100516230149.V8088@delplex.bde.org> In-Reply-To: <201005141426.o4EEQu7B081269@svn.freebsd.org> References: <201005141426.o4EEQu7B081269@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100516230149.V8088>