diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-01 23:11:57 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-01 23:11:57 +0000 |
commit | 9bf9aa5106eb663a371b2b0bc7ab929500ad6ff9 (patch) | |
tree | b5363e683e19c72b50582f092707d3ae203c7b8c | |
parent | 0478c15d1ecdbc53cf106419629479bcb2a0f4af (diff) | |
download | llvm-9bf9aa5106eb663a371b2b0bc7ab929500ad6ff9.tar.gz llvm-9bf9aa5106eb663a371b2b0bc7ab929500ad6ff9.tar.bz2 llvm-9bf9aa5106eb663a371b2b0bc7ab929500ad6ff9.tar.xz |
Fixes warnings emitted by Visual Studio 2010 compiler.
Patch by Erik Olofsson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126796 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 4 | ||||
-rw-r--r-- | unittests/Support/MathExtrasTest.cpp | 2 | ||||
-rw-r--r-- | utils/unittest/googletest/include/gtest/gtest.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index 8af07c74fd..de5349459d 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -274,8 +274,8 @@ public: 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, diff --git a/unittests/Support/MathExtrasTest.cpp b/unittests/Support/MathExtrasTest.cpp index 3db1f77d44..0a6724c7e7 100644 --- a/unittests/Support/MathExtrasTest.cpp +++ b/unittests/Support/MathExtrasTest.cpp @@ -73,7 +73,7 @@ TEST(MathExtras, CountLeadingOnes_64) { } TEST(MathExtras, FloatBits) { - static const float kValue = 5632.34; + static const float kValue = 5632.34f; EXPECT_FLOAT_EQ(kValue, BitsToFloat(FloatToBits(kValue))); } diff --git a/utils/unittest/googletest/include/gtest/gtest.h b/utils/unittest/googletest/include/gtest/gtest.h index 921fad11fc..5470082abd 100644 --- a/utils/unittest/googletest/include/gtest/gtest.h +++ b/utils/unittest/googletest/include/gtest/gtest.h @@ -1258,6 +1258,8 @@ AssertionResult CmpHelperEQ(const char* expected_expression, #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) { |