[cfe-dev] Bogus Warnings

Bill Wendling wendling at apple.com
Wed Jul 20 13:37:27 PDT 2011


Thanks!

-bw

On Jul 20, 2011, at 12:52 PM, Ted Kremenek wrote:

> Now fixed in r135610.
> 
> On Jul 20, 2011, at 11:52 AM, Bill Wendling wrote:
> 
>> Since yesterday, I've been getting a lot of bogus warnings about uninitialized variables (see below). These are bogus because they're initialized via reference in another function.
>> 
>> -bw
>> 
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2106:29: warning: variable 'CarrySetting' is uninitialized when used here [-Wuninitialized]
>> if (!CanAcceptCarrySet && CarrySetting) {
>>                           ^~~~~~~~~~~~
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2085:3: note: variable 'CarrySetting' is declared here
>> bool CarrySetting;
>> ^
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2085:20: note: add initialization to silence this warning
>> bool CarrySetting;
>>                  ^
>>                   = false
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2133:7: warning: variable 'ProcessorIMod' is uninitialized when used here [-Wuninitialized]
>> if (ProcessorIMod) {
>>     ^~~~~~~~~~~~~
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2084:3: note: variable 'ProcessorIMod' is declared here
>> unsigned ProcessorIMod;
>> ^
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2084:25: note: add initialization to silence this warning
>> unsigned ProcessorIMod;
>>                       ^
>>                        = 0
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2122:7: warning: variable 'CanAcceptPredicationCode' is uninitialized when used here [-Wuninitialized]
>> if (CanAcceptPredicationCode) {
>>     ^~~~~~~~~~~~~~~~~~~~~~~~
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2101:3: note: variable 'CanAcceptPredicationCode' is declared here
>> bool CanAcceptCarrySet, CanAcceptPredicationCode;
>> ^
>> /Volumes/Sandbox/llvm/llvm.src/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:2101:51: note: add initialization to silence this warning
>> bool CanAcceptCarrySet, CanAcceptPredicationCode;
>>                                                 ^
>>                                                  = false
>> 
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 




More information about the cfe-dev mailing list