mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
5b9ca3b979
components/detournavigator/navmeshdb.cpp:183:43: warning: Division by zero [clang-analyzer-core.DivideZero] setMaxPageCount(*mDb, maxFileSize / dbPageSize + static_cast<std::uint64_t>((maxFileSize % dbPageSize) != 0)); ~~~~~~~~~~~~^~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:182:33: note: Calling 'getPageSize' const auto dbPageSize = getPageSize(*mDb); ^~~~~~~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:144:13: note: 'value' initialized to 0 std::uint64_t value = 0; ^~~~~~~~~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:145:13: note: Calling 'request<DetourNavigator::(anonymous namespace)::GetPageSize, unsigned long *, >' request(db, statement, &value, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ components/sqlite3/request.hpp:254:64: note: Left side of '&&' is false for (std::size_t i = 0; executeStep(db, statement) && i < max; ++i) ^ components/detournavigator/navmeshdb.cpp:145:13: note: Returning from 'request<DetourNavigator::(anonymous namespace)::GetPageSize, unsigned long *, >' request(db, statement, &value, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:146:13: note: Returning zero (loaded from 'value') return value; ^~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:182:33: note: Returning from 'getPageSize' const auto dbPageSize = getPageSize(*mDb); ^~~~~~~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:182:9: note: 'dbPageSize' initialized to 0 const auto dbPageSize = getPageSize(*mDb); ^~~~~~~~~~~~~~~~~~~~~ components/detournavigator/navmeshdb.cpp:183:43: note: Division by zero setMaxPageCount(*mDb, maxFileSize / dbPageSize + static_cast<std::uint64_t>((maxFileSize % dbPageSize) != 0)); ~~~~~~~~~~~~^~~~~~~~~~~~