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<kovarththanan.rajarat...@gmail.com>
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?
cheers,
Pádraig.