From bde6b27cd7da12f1744117cee7879e0949021f94 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Fri, 25 Mar 2011 03:12:44 +0000 Subject: [PATCH] Fixed some compilation errors and warnings --- coding/coding_tests/bit_shift_test.cpp | 2 +- coding/coding_tests/file_container_test.cpp | 2 +- coding/coding_tests/varint_test.cpp | 2 +- indexer/indexer_tests/cell_id_test.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coding/coding_tests/bit_shift_test.cpp b/coding/coding_tests/bit_shift_test.cpp index 77c7f17078..67ef457044 100644 --- a/coding/coding_tests/bit_shift_test.cpp +++ b/coding/coding_tests/bit_shift_test.cpp @@ -16,7 +16,7 @@ UNIT_TEST(BitShift) uint32_t ui32 = 1; TEST_EQUAL(0x80000000U, bits::ror(ui32, 1), ()); uint64_t ui64 = 1; - TEST_EQUAL(0x8000000000000000U, bits::ror(ui64, 1), ()); + TEST_EQUAL(0x8000000000000000LL, bits::ror(ui64, 1), ()); uint16_t v = 0x58b1; TEST_EQUAL(0x2b16, bits::ror(v, 3), ()); diff --git a/coding/coding_tests/file_container_test.cpp b/coding/coding_tests/file_container_test.cpp index fbcec8f687..5384574674 100644 --- a/coding/coding_tests/file_container_test.cpp +++ b/coding/coding_tests/file_container_test.cpp @@ -86,7 +86,7 @@ UNIT_TEST(FilesContainer_Shared) FileWriter::DeleteFileX(fName); uint32_t const count = 10; - int64_t const test64 = 908175281437210836; + int64_t const test64 = 908175281437210836LL; { // shared container fill diff --git a/coding/coding_tests/varint_test.cpp b/coding/coding_tests/varint_test.cpp index e7687345e7..5271b6050b 100644 --- a/coding/coding_tests/varint_test.cpp +++ b/coding/coding_tests/varint_test.cpp @@ -92,7 +92,7 @@ UNIT_TEST(VarIntMax) TestVarUint(uint32_t(-1)); TestVarUint(uint64_t(-1)); TestVarInt(int32_t(2147483647)); - TestVarInt(int32_t(-2147483648)); + TestVarInt(int32_t(-2147483648LL)); TestVarInt(int64_t(9223372036854775807LL)); // TestVarInt(int64_t(-9223372036854775808LL)); } diff --git a/indexer/indexer_tests/cell_id_test.cpp b/indexer/indexer_tests/cell_id_test.cpp index 1be63e604c..dec42f678b 100644 --- a/indexer/indexer_tests/cell_id_test.cpp +++ b/indexer/indexer_tests/cell_id_test.cpp @@ -37,7 +37,7 @@ namespace } } -UNIT_TEST(RandomRecode) +UNIT_TEST(CellId_RandomRecode) { PseudoRNG32 rng; for (size_t i = 0; i < 1000; ++i)