cmtice wrote:

I seem to have found an issue with this warning.  I have some code roughly like 
this:

if (var1 < 0)
    return;

var2 = malloc(sizeof(...) * var1).

I'm getting warnings complaining that  the malloc is assigning -8 instead of 8. 
 The only way it could be -8 would be if var1 was negative. But if var1 is 
negative the malloc never gets executed (because of the return above). So it's 
warning in a case that can't happen.

https://github.com/llvm/llvm-project/pull/150028
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to