From 4f730dc750ab2120d8ca28728c73021bd159ac05 Mon Sep 17 00:00:00 2001 From: Ilia K Date: Mon, 12 Sep 2016 05:25:33 +0000 Subject: Fix about a dozen compile warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: It fixes the following compile warnings: 1. '0' flag ignored with precision and ‘%d’ gnu_printf format 2. enumeral and non-enumeral type in conditional expression 3. format ‘%d’ expects argument of type ‘int’, but argument 4 has type ... 4. enumeration value ‘...’ not handled in switch 5. cast from type ‘const uint64_t* {aka ...}’ to type ‘int64_t* {aka ...}’ casts away qualifiers 6. extra ‘;’ 7. comparison between signed and unsigned integer expressions 8. variable ‘register_operand’ set but not used 9. control reaches end of non-void function Reviewers: jingham, emaste, zturner, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24331 llvm-svn: 281191 --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 17028cb4d18..f2f3d5be9ff 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -518,7 +518,7 @@ int64_t PythonInteger::GetInteger() const { // 0xffffffffffffffff. If we use the unsigned long long // it will work as expected. const uint64_t uval = PyLong_AsUnsignedLongLong(m_py_obj); - result = *((int64_t *)&uval); + result = static_cast(uval); } return result; } -- cgit v1.2.3