[Lldb-commits] [lldb] r346841 - Suppress a "-Wliteral-conversion" compiler warning.

Haojian Wu via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 14 01:53:46 PST 2018


Author: hokein
Date: Wed Nov 14 01:53:45 2018
New Revision: 346841

URL: http://llvm.org/viewvc/llvm-project?rev=346841&view=rev
Log:
Suppress a "-Wliteral-conversion" compiler warning.

error: implicit conversion from 'double' to 'uint64_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion]

Modified:
    lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp

Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=346841&r1=346840&r2=346841&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Wed Nov 14 01:53:45 2018
@@ -781,7 +781,7 @@ static uint64_t decodeTaggedTimeInterval
   if (encodedTimeInterval == 0)
     return 0.0;
   if (encodedTimeInterval == std::numeric_limits<uint64_t>::max())
-    return -0.0;
+    return (uint64_t)-0.0;
 
   TaggedDoubleBits encodedBits = { .i = encodedTimeInterval };
   DoubleBits decodedBits;




More information about the lldb-commits mailing list