[LLVMbugs] [Bug 14041] false positive: The left operand of '>=' is a garbage value

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 8 11:51:51 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14041

Jordan Rose <jordan_rose at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jordan_rose at apple.com
         Resolution|                            |WONTFIX

--- Comment #2 from Jordan Rose <jordan_rose at apple.com> 2012-10-08 13:51:51 CDT ---
I think that makes this "not to be fixed". The analyzer does its best to guess
intent from parameter types, and not respecting 'const' would make it a lot
less useful.

If the headers are outside your control, you could either put in an initializer
for 'namestr', or do something like the following:

#ifdef __clang_analyzer__
extern void touch(void *);
touch(namestr);
#endif

But we don't normally recommend this because it can mask other errors if/when
the header is fixed or the analyzer gets smarter.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list