4 ms·
huh? gcc 4.2 -Wall: warning: the address of ‘geteuid’ will never be NULL gcc 4.8 -Wall: warning: the comparison will always evaluate as 'false' for the
by w-m 13y ago
huh?
gcc 4.2 -Wall:
warning: the address of ‘geteuid’ will never be NULL
gcc 4.8 -Wall:
warning: the comparison will always evaluate as 'false' for the address of 'geteuid' will never be NULL [-Waddress]
if (getuid() != 0 && geteuid == 0)
Also, as came up in the goto fail discussion, -Wunreachable-code was removed from gcc and doesn't warn on anything.
- spc476 13y agoIt appears that GCC has changed a bit since that article was originally written (2010). And I'm using a GCC that is a bit old.
- nkeets 13y agoIt appears that you are spreading FUD. In a thread discussing if one line bugs could be written on purpose, it is only fitting to discuss if you demonstrated gcc's failing by using a version older than 4.2 was also on purpose. By the way, I'm interested to know which version you used.
- spc476 13y agoHow am I spreading FUD? By using an older version of GCC and reporting what I saw? Should I edit my post to remove all mentions of GCC and just leave how the code is interpreted as is?
- nkeets 13y agoIt has to be before 4.2 (you never said which version you used), which is really old. And you went to all this trouble but never occurred to you that compiler version could be a factor? Sure it could be an honest mistake, but that's also true for Apple's bug (and the rest).