[Lldb-commits] [PATCH] D24331: Fix about a dozen compile warnings

Ilia K via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 7 23:59:35 PDT 2016


ki.stfu added a comment.

BTW, the following warnings remain:

1. unrecognized command line option ‘-Wno-vla-extension’
2. unrecognized command line option ‘-Wno-deprecated-register’
3. comparison of unsigned expression >= 0 is always true

  [2782/3295] Building CXX object tools/lldb/source/Plugins/Instruction/ARM/CMakeFiles/lldbPluginInstructionARM.dir/EmulationStateARM.cpp.o
  ../tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp: In member function ‘bool EmulationStateARM::StorePseudoRegisterValue(uint32_t, uint64_t)’:
  ../tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp:69:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
                   ^
  ../tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp: In member function ‘uint64_t EmulationStateARM::ReadPseudoRegisterValue(uint32_t, bool&)’:
  ../tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp:92:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
                   ^
  ...
  [3136/3295] Building CXX object tools/lldb/source/Utility/CMakeFiles/lldbUtility.dir/ARM64_DWARF_Registers.cpp.o
  ../tools/lldb/source/Utility/ARM64_DWARF_Registers.cpp: In function ‘bool arm64_dwarf::GetRegisterInfo(unsigned int, lldb_private::RegisterInfo&)’:
  ../tools/lldb/source/Utility/ARM64_DWARF_Registers.cpp:175:15: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     if (reg_num >= x0 && reg_num <= pc) {
                 ^

4. format not a string literal and no format arguments

  [3217/3295] Building CXX object tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o
  tools/lldb/scripts/LLDBWrapPython.cpp: In function ‘PyObject* _wrap_SBError_SetErrorStringWithFormat__SWIG_3(PyObject*, PyObject*)’:
  tools/lldb/scripts/LLDBWrapPython.cpp:28426:70: warning: format not a string literal and no format arguments [-Wformat-security]
       result = (int)(arg1)->SetErrorStringWithFormat((char const *)arg2);
                                                                        ^

5. comparison between signed and unsigned integer expressions

  tools/lldb/scripts/LLDBWrapPython.cpp: In function ‘PyObject* _wrap_SBTarget_BreakpointCreateByNames__SWIG_0(PyObject*, PyObject*)’:
  tools/lldb/scripts/LLDBWrapPython.cpp:55744:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < arg3; i++) {
                       ^
  tools/lldb/scripts/LLDBWrapPython.cpp: In function ‘PyObject* _wrap_SBTarget_BreakpointCreateByNames__SWIG_1(PyObject*, PyObject*)’:
  tools/lldb/scripts/LLDBWrapPython.cpp:55836:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < arg3; i++) {
                       ^
  tools/lldb/scripts/LLDBWrapPython.cpp: In function ‘PyObject* _wrap_SBTarget_BreakpointCreateByNames__SWIG_2(PyObject*, PyObject*)’:
  tools/lldb/scripts/LLDBWrapPython.cpp:55937:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < arg3; i++) {
                       ^


https://reviews.llvm.org/D24331





More information about the lldb-commits mailing list