Hi,

the warning which is mentioned in the ticket
f51d9501800de5a0fb69d5048ce6662981b461ec still occurs also with newer gcc
versions. The ticket was closed after a gcc bug report was opened. The gcc
bug was closed due to a missing testcase.
I had a quick look at the problem and it seems that the warning is right
since in certain context and with optimizations enabled gcc can prove
that EXPR_FULLSIZE
- nSize == 0 and thus the triggered warning for this is correct.
Replacing
memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
By
if(EXPR_FULLSIZE-nSize > 0)
     memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
would remove the warning,

Cheers,
-Bernhard

Reply via email to