teemperor created this revision. teemperor added a reviewer: zturner. Herald added a subscriber: mgorny.
With SWIG 3.0.12 I get the following compiler warnings when compiling LLDB: tools/lldb/scripts/LLDBWrapPython.cpp:23699:52: warning: format string is not a string literal (potentially insecure) [-Wformat-security] result = (int)(arg1)->SetErrorStringWithFormat((char const *)arg2); ^ ~~~~ tools/lldb/scripts/LLDBWrapPython.cpp:23699:52: note: treat the string as an argument to avoid this result = (int)(arg1)->SetErrorStringWithFormat((char const *)arg2); ^ "%s", tools/lldb/scripts/LLDBWrapPython.cpp:52418:21: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < arg3; i++) { ~ ^ ~~~~ tools/lldb/scripts/LLDBWrapPython.cpp:52510:21: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < arg3; i++) { ~ ^ ~~~~ tools/lldb/scripts/LLDBWrapPython.cpp:52611:21: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare] for (i = 0; i < arg3; i++) { ~ ^ ~~~~ As the code is anyway generated we probably should disable those two warnings for the source file. https://reviews.llvm.org/D47411 Files: source/API/CMakeLists.txt Index: source/API/CMakeLists.txt =================================================================== --- source/API/CMakeLists.txt +++ source/API/CMakeLists.txt @@ -108,6 +108,12 @@ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") endif() endif() + +if (NOT MSVC) + # The generated code triggers some compiler warnings that we can ignore. + set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-sign-compare -Wno-format-security") +endif() + set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1) if (CLANG_CL) set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
Index: source/API/CMakeLists.txt =================================================================== --- source/API/CMakeLists.txt +++ source/API/CMakeLists.txt @@ -108,6 +108,12 @@ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") endif() endif() + +if (NOT MSVC) + # The generated code triggers some compiler warnings that we can ignore. + set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-sign-compare -Wno-format-security") +endif() + set_source_files_properties(${LLDB_WRAP_PYTHON} PROPERTIES GENERATED 1) if (CLANG_CL) set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits