[llvm-commits] [llvm] r126796 - in /llvm/trunk: lib/MC/MachObjectWriter.cpp unittests/Support/MathExtrasTest.cpp utils/unittest/googletest/include/gtest/gtest.h
Oscar Fuentes
ofv at wanadoo.es
Tue Mar 1 15:11:57 PST 2011
Author: ofv
Date: Tue Mar 1 17:11:57 2011
New Revision: 126796
URL: http://llvm.org/viewvc/llvm-project?rev=126796&view=rev
Log:
Fixes warnings emitted by Visual Studio 2010 compiler.
Patch by Erik Olofsson!
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
llvm/trunk/unittests/Support/MathExtrasTest.cpp
llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=126796&r1=126795&r2=126796&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Tue Mar 1 17:11:57 2011
@@ -274,8 +274,8 @@
if (is64Bit())
Write32(0); // reserved3
- assert(OS.tell() - Start == is64Bit() ? macho::Section64Size :
- macho::Section32Size);
+ assert(OS.tell() - Start == (is64Bit() ? macho::Section64Size :
+ macho::Section32Size));
}
void WriteSymtabLoadCommand(uint32_t SymbolOffset, uint32_t NumSymbols,
Modified: llvm/trunk/unittests/Support/MathExtrasTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/MathExtrasTest.cpp?rev=126796&r1=126795&r2=126796&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/MathExtrasTest.cpp (original)
+++ llvm/trunk/unittests/Support/MathExtrasTest.cpp Tue Mar 1 17:11:57 2011
@@ -73,7 +73,7 @@
}
TEST(MathExtras, FloatBits) {
- static const float kValue = 5632.34;
+ static const float kValue = 5632.34f;
EXPECT_FLOAT_EQ(kValue, BitsToFloat(FloatToBits(kValue)));
}
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h?rev=126796&r1=126795&r2=126796&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h Tue Mar 1 17:11:57 2011
@@ -1258,6 +1258,8 @@
#pragma warning(push) // Saves the current warning state.
#pragma warning(disable:4389) // Temporarily disables warning on
// signed/unsigned mismatch.
+#pragma warning(disable:4805) // Temporarily disables warning on
+ // unsafe mix of types
#endif
if (expected == actual) {
More information about the llvm-commits
mailing list