From cef5fcd86f68d8caed0b3b38a8162c88552ac785 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 16 Apr 2020 23:44:06 -0500 Subject: [PATCH] [nostalgia/core/userland] Enable sign-conversion warning --- src/nostalgia/core/userland/CMakeLists.txt | 2 ++ src/nostalgia/core/userland/media.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/core/userland/CMakeLists.txt b/src/nostalgia/core/userland/CMakeLists.txt index 48f8f1ab..8c559fdc 100644 --- a/src/nostalgia/core/userland/CMakeLists.txt +++ b/src/nostalgia/core/userland/CMakeLists.txt @@ -3,6 +3,8 @@ add_library( media.cpp ) +target_compile_options(NostalgiaCore-Userspace PRIVATE -Wsign-conversion) + target_link_libraries( NostalgiaCore-Userspace PUBLIC OxFS diff --git a/src/nostalgia/core/userland/media.cpp b/src/nostalgia/core/userland/media.cpp index 888dc65b..15cfde9f 100644 --- a/src/nostalgia/core/userland/media.cpp +++ b/src/nostalgia/core/userland/media.cpp @@ -21,7 +21,7 @@ char *loadRom(const char *path) { return nullptr; } - const std::size_t size = file.tellg(); + const auto size = file.tellg(); file.seekg(0, std::ios::beg); auto buff = new char[size]; file.read(buff, size);