diff --git a/coding/internal/expat_impl.h b/coding/internal/expat_impl.h index b9262d6b44..04af168d4f 100644 --- a/coding/internal/expat_impl.h +++ b/coding/internal/expat_impl.h @@ -392,7 +392,7 @@ public: // @cmember Get the current line number - int GetCurrentLineNumber () + unsigned long GetCurrentLineNumber () { assert (m_p != NULL); return XML_GetCurrentLineNumber (m_p); diff --git a/coding/parse_xml.hpp b/coding/parse_xml.hpp index 54f17aa537..2fc3cf81c6 100644 --- a/coding/parse_xml.hpp +++ b/coding/parse_xml.hpp @@ -13,7 +13,7 @@ uint64_t ParseXMLSequence(SequenceT & source, XMLDispatcherT & dispatcher, bool if (!parser.Create()) return 0; - int const BUFFER_SIZE = 16 * 1024; + uint32_t const BUFFER_SIZE = 16 * 1024; uint64_t res = 0; uint64_t readed; @@ -26,7 +26,7 @@ uint64_t ParseXMLSequence(SequenceT & source, XMLDispatcherT & dispatcher, bool if (readed == 0) return res; - if (!parser.ParseBuffer(readed, false)) + if (!parser.ParseBuffer(static_cast(readed), false)) { parser.PrintError(); return res; diff --git a/generator/generator_tests/check_mwms.cpp b/generator/generator_tests/check_mwms.cpp index 711a75ff37..927e308aeb 100644 --- a/generator/generator_tests/check_mwms.cpp +++ b/generator/generator_tests/check_mwms.cpp @@ -51,7 +51,7 @@ UNIT_TEST(CheckMWM_GeomIndex) // Make interval index objects for each scale bucket. vector>> scale2Index; for (size_t i = 0; i < treesReader.Size(); ++i) - scale2Index.emplace_back(new IntervalIndex(treesReader.SubReader(i))); + scale2Index.emplace_back(new IntervalIndex(treesReader.SubReader(static_cast(i)))); // Pass full coverage as input for test. uint64_t beg = 0; diff --git a/generator/generator_tests/triangles_tree_coding_test.cpp b/generator/generator_tests/triangles_tree_coding_test.cpp index c21c933477..1ab03f0fde 100644 --- a/generator/generator_tests/triangles_tree_coding_test.cpp +++ b/generator/generator_tests/triangles_tree_coding_test.cpp @@ -37,7 +37,7 @@ namespace } void CompareTriangles(serial::OutPointsT const & test, - P arrP[], uintptr_t arrT[][3], size_t count) + P arrP[], int arrT[][3], size_t count) { TEST_EQUAL(test.size(), 3*count, (test)); @@ -48,7 +48,7 @@ namespace } } - void TestTrianglesCoding(P arrP[], size_t countP, uintptr_t arrT[][3], size_t countT) + void TestTrianglesCoding(P arrP[], size_t countP, int arrT[][3], size_t countT) { tesselator::TrianglesInfo info; info.AssignPoints(arrP, arrP + countP); @@ -88,7 +88,7 @@ UNIT_TEST(TrianglesCoding_Smoke) { { P arrP[] = { P(0, 0), P(0, 1), P(1, 0), P(1, 1), P(0, -1), P(-1, 0) }; - uintptr_t arrT[][3] = { {0, 1, 2}, {1, 3, 2}, {4, 0, 2}, {1, 0, 5}, {4, 5, 0} }; + int arrT[][3] = { {0, 1, 2}, {1, 3, 2}, {4, 0, 2}, {1, 0, 5}, {4, 5, 0} }; TestTrianglesCoding(arrP, ARRAY_SIZE(arrP), arrT, ARRAY_SIZE(arrT)); } @@ -103,7 +103,7 @@ UNIT_TEST(TrianglesCoding_Rect) P(-11.249999842839316, -44.999999874271452) }; - uintptr_t arrT[][3] = { {2, 0, 1}, {0, 2, 3} }; + int arrT[][3] = { {2, 0, 1}, {0, 2, 3} }; TestTrianglesCoding(arrP, ARRAY_SIZE(arrP), arrT, ARRAY_SIZE(arrT)); } diff --git a/generator/update_generator.cpp b/generator/update_generator.cpp index bbbac39d59..1e19c8bfed 100644 --- a/generator/update_generator.cpp +++ b/generator/update_generator.cpp @@ -78,8 +78,14 @@ namespace update ++m_processedFiles; - cnt.SetRemoteSizes(GetFileSize(cnt, MapOptions::Map), - GetFileSize(cnt, MapOptions::CarRouting)); + uint64_t szMap = GetFileSize(cnt, MapOptions::Map); + uint64_t szRouting = GetFileSize(cnt, MapOptions::CarRouting); + + ASSERT_EQUAL(static_cast(szMap), szMap, ()); + ASSERT_EQUAL(static_cast(szRouting), szRouting, ()); + + cnt.SetRemoteSizes(static_cast(szMap), + static_cast(szRouting)); string const fName = cnt.GetNameWithExt(MapOptions::Map); auto found = find(m_files.begin(), m_files.end(), fName);