bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] src/sort.c: pipe_fork is always called with tries > 0


From: Jim Meyering
Subject: Re: [PATCH] src/sort.c: pipe_fork is always called with tries > 0
Date: Wed, 06 Jan 2010 16:04:57 +0100

Kovarththanan Rajaratnam wrote:
> clang detected the following false positive:
>
> sort.c:906:11: warning: The left operand of '<' is a garbage value
>   if (pid < 0)
>       ~~~ ^
>
> src/sort.c: Add an assert indicating that pipe_fork is always called with 
> tries > 0. This allows clang to deduce that 'pid' will always be set/is valid.

Thank you for all of the patches.
I too would like to address all of clang's warnings about
coreutils, but it seems like clang is not quite mature enough
for me to be comfortable adding the many assertions required
to quiet its false positive warnings.

Is there any other way to make clang understand that no warning is
required here?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]