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?