[keel] Enable sign-conversion warning

This commit is contained in:
Gary Talent 2023-06-02 00:00:39 -05:00
parent 8cd2ef2d8b
commit 60aad6335c
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,10 @@ add_library(
typestore.cpp typestore.cpp
) )
if(NOT MSVC)
target_compile_options(Keel PRIVATE -Wsign-conversion)
endif()
target_link_libraries( target_link_libraries(
Keel PUBLIC Keel PUBLIC
OxClaw OxClaw

View File

@ -32,7 +32,7 @@ ox::Result<ox::ModelObject> readAsset(ox::TypeStore *ts, const ox::Buffer &buff)
ox::Result<AssetHdr> readAssetHeader(const char *buff, std::size_t buffLen) noexcept { ox::Result<AssetHdr> readAssetHeader(const char *buff, std::size_t buffLen) noexcept {
AssetHdr out; AssetHdr out;
const auto err = readUuidHeader(buff, buffLen).moveTo(&out.uuid); const auto err = readUuidHeader(buff, buffLen).moveTo(&out.uuid);
const auto offset = err ? 0 : K1HdrSz; const auto offset = err ? 0u : K1HdrSz;
buff = buff + offset; buff = buff + offset;
buffLen = buffLen - offset; buffLen = buffLen - offset;
oxReturnError(ox::readClawHeader(buff, buffLen).moveTo(&out.clawHdr)); oxReturnError(ox::readClawHeader(buff, buffLen).moveTo(&out.clawHdr));