bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] src/sort.c: sort() is always called with nfiles > 0


From: Kovarththanan Rajaratnam
Subject: Re: [PATCH] src/sort.c: sort() is always called with nfiles > 0
Date: Wed, 06 Jan 2010 16:53:19 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Pádraig Brady wrote:
> On 06/01/10 08:36, Kovarththanan Rajaratnam wrote:
>> clang detected the following false positive:
>>
>> sort.c:2946:3: warning: Pass-by-value argument in function call is
>> undefined
>>    free (buf.buf);
>>    ^     ~~~~~~~
>>
>> src/sort.c: Add an assert indicating that sort() is always called with
>> nfiles>  0. This allows clang to deduce that 'buf.buf' is always
>> set/valid.
>>
>> Signed-off-by: Kovarththanan
>> Rajaratnam<address@hidden>
> 
> Again this false positive is triggered as it looks like
> alang is analyzing the functions in isolation, rather
> than the whole compilation unit. Is there an option
> to get clang to consider just the whole compilation unit?

No, clang doesn't perform inter procedural analysis.

-- 
Best regards,
Kovarththanan Rajaratnam




reply via email to

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