[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sysvinit-devel] [patch] Get startpar building with clang
From: |
Dr. Werner Fink |
Subject: |
Re: [sysvinit-devel] [patch] Get startpar building with clang |
Date: |
Thu, 10 Apr 2014 14:39:16 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Apr 10, 2014 at 09:42:13AM +0200, Petter Reinholdtsen wrote:
>
> I've submitted startpar for review with Coverty, and it reported four
> issues on <URL: https://scan.coverity.com/projects/1719 >. But the
> project is not yet accepted, so I can not figure out which issues this
> is. So I had a look at building it with clang, and it found a few
> issues with ignored return values and using a GCC extention. The
> following patch get rid of all warnings from Clang, but I am unsure if
> this is the correct fix. Any comments?
>
> The timerdiff() change make sense to me, but simply continuing to ignore
> exit values do not seem like a safe way forward. But I did not take the
> time to figure out why these exit values were ignored in the first
> place. Werner, do you remember?
Not that I'm aware ... AFAIK the TEMP_FAILURE_RETRY() macro can not
be handled this way by the compiler. Maybe a redefinition is required
to do an error() if errno is not EINTR.
Werner
> int status;
> if (!splashpid)
> return;
> - TEMP_FAILURE_RETRY(waitpid(splashpid, &status, 0));
> + (void)TEMP_FAILURE_RETRY(waitpid(splashpid, &status, 0));
> }
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
pgpCG_bkhrU16.pgp
Description: PGP signature