oizma / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

checkGuardBlock could be written with an ifdef GUARD_BLOCKS #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run Coverity on mozilla-central from something after 
http://hg.mozilla.org/mozilla-central/rev/582be9aca672

What is the expected output?
no DEADCODE warnings for unreachable code in TAllocation::checkGuardBlock

What do you see instead?
DEADCODE warning in TAllocation::checkGuardBlock for "for (size_t x = 0; x < 
guardBlockSize; x++)" because guardBlockSize is fixed at 0 ifndef GUARD_BLOCKS

What version of the product are you using?
r367

On what operating system?
Linux with Coverity 4.5

Please provide any additional information below.

Original issue reported on code.google.com by timel...@gmail.com on 12 Oct 2010 at 4:39

Attachments:

GoogleCodeExporter commented 9 years ago
This is completely harmless and does exactly what is intended. Although it does 
not rely on it, any half-decent optimizing compiler will detect and eliminate 
the dead code.

The entire loop could be wrapped in ifdefs, but then the compiler would no 
longer validate the syntax, potentially breaking the build under some 
configurations when a change is made to this code.

Original comment by Nicolas....@gmail.com on 12 Oct 2010 at 10:48

GoogleCodeExporter commented 9 years ago
I am marking it as WontFix. Please re-open if you feel strongly about it. BTW 
we may get rid of the custom allocator in the near future.

Original comment by alokp@chromium.org on 14 Oct 2010 at 6:54