<div dir="ltr"><div style>How do folks handle warnings when building debug lldb?</div><div style><br></div><div style>I'm building on Linux with Clang 3.2 and had to add these options to get the number down to a reasonable count:</div>
<div style><br></div><div style>-Wno-sign-compare -Wno-four-char-constants -Wno-extended-offsetof -Wno-unused-function</div><div style><br></div><div style>Still seeing several others though (down below). Having all these warnings can make it difficult to track down new ones though.</div>
<div style> -Mike</div><div><br></div><div><div>mikesart@mikesart-rad:~/data/src/llvm/build$ lldb_build</div><div>ninja: Entering directory `/home/mikesart/data/src/llvm/build'</div><div>[88/2270] cd /home/mikesart/data/src/llvm/build/tools/clang/lib/Basic && /usr/local/bin/cmak...ang/lib/Basic/SVNVersion.inc -P /home/mikesart/data/src/llvm/llvm/cmake/modules/GetSVN.cmak</div>
<div>-- Found Subversion: /usr/bin/svn (found version "1.7.9") </div><div>[140/2270] Building lldb python wrapper</div><div>SWIG needs to be re-run.</div><div>[633/2270] Building CXX object lib/Target/PowerPC/InstPrinter/CMakeFiles/LLVMPowerPCAsmPrinter.dir/PPCInstPrinter.cpp.o</div>
<div>/home/mikesart/data/src/llvm/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp:92:13: warning: enumeration value 'PRED_BAD' not handled in switch [-Wswitch]</div><div> switch ((PPC::Predicate)Code) {</div>
<div> ^</div><div>1 warning generated.</div><div>[722/2270] Building CXX object lib/Target/PowerPC/MCTargetDesc/CMakeFiles/LLVMPowerPCDesc.dir/PPCPredicates.cpp.o</div><div>/home/mikesart/data/src/llvm/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp:20:11: warning: enumeration value 'PRED_BAD' not handled in switch [-Wswitch]</div>
<div> switch (Opcode) {</div><div> ^</div><div>/home/mikesart/data/src/llvm/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp:34:11: warning: enumeration value 'PRED_BAD' not handled in switch [-Wswitch]</div>
<div> switch (Opcode) {</div><div> ^</div><div>2 warnings generated.</div><div>[1936/2270] Building CXX object tools/lldb/source/Core/CMakeFiles/lldbCore.dir/DataExtractor.cpp.o</div><div>/home/mikesart/data/src/llvm/llvm/tools/lldb/source/Core/DataExtractor.cpp:1328:22: warning: hexadecimal floating constants are a C99 feature [-Wc99-extensions]</div>
<div> return u.f * 0x1.0p125f;</div><div> ^</div><div>/home/mikesart/data/src/llvm/llvm/tools/lldb/source/Core/DataExtractor.cpp:1333:18: warning: hexadecimal floating constants are a C99 feature [-Wc99-extensions]</div>
<div> return u.f * 0x1.0p-112f;</div><div> ^</div><div>2 warnings generated.</div><div>[2264/2270] Building CXX object tools/lldb/source/CMakeFiles/liblldb.dir/__/scripts/LLDBWrapPython.cpp.o<br></div>
</div>
<div><div>tools/lldb/scripts/LLDBWrapPython.cpp:2380:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]</div><div> res = SWIG_AddCast(res);</div><div> ~~~ ^ ~~~</div>
<div>tools/lldb/scripts/LLDBWrapPython.cpp:2383:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]</div><div> res = SWIG_AddCast(res); </div><div>
~~~ ^ ~~~</div><div>tools/lldb/scripts/LLDBWrapPython.cpp:2905:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]</div>
<div> if (PyType_Ready(tp) < 0)</div><div> ^~~~~~~~~~~~~~~~~~~~</div><div>tools/lldb/scripts/LLDBWrapPython.cpp:2929:10: note: uninitialized use occurs here</div><div> return res;</div><div> ^~~</div>
<div>tools/lldb/scripts/LLDBWrapPython.cpp:2905:5: note: remove the 'if' if its condition is always false</div><div> if (PyType_Ready(tp) < 0)</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~</div><div>tools/lldb/scripts/LLDBWrapPython.cpp:2886:10: note: initialize the variable 'res' to silence this warning</div>
<div> int res;</div><div> ^</div><div> = 0</div><div>tools/lldb/scripts/LLDBWrapPython.cpp:54935:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign]</div><div>
clientdata = clientdata;</div><div> ~~~~~~~~~~ ^ ~~~~~~~~~~</div><div>4 warnings generated.</div></div><div><br></div></div>