From be1954e04cb5a0c3a526f78ed5490a5e65310280 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 15 Oct 2020 14:49:45 -0400 Subject: core: Fix clang build Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795 --- src/core/hle/service/bcat/backend/backend.h | 8 ++++---- src/core/hle/service/bcat/backend/boxcat.cpp | 9 +++++++++ src/core/hle/service/bcat/module.cpp | 3 ++- 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/bcat') diff --git a/src/core/hle/service/bcat/backend/backend.h b/src/core/hle/service/bcat/backend/backend.h index 48bbbe66f..1e5e93290 100644 --- a/src/core/hle/service/bcat/backend/backend.h +++ b/src/core/hle/service/bcat/backend/backend.h @@ -53,10 +53,10 @@ struct DeliveryCacheProgressImpl { ResultCode result = RESULT_SUCCESS; DirectoryName current_directory; FileName current_file; - s64 current_downloaded_bytes; ///< Bytes downloaded on current file. - s64 current_total_bytes; ///< Bytes total on current file. - s64 total_downloaded_bytes; ///< Bytes downloaded on overall download. - s64 total_bytes; ///< Bytes total on overall download. + u64 current_downloaded_bytes; ///< Bytes downloaded on current file. + u64 current_total_bytes; ///< Bytes total on current file. + u64 total_downloaded_bytes; ///< Bytes downloaded on overall download. + u64 total_bytes; ///< Bytes total on overall download. INSERT_PADDING_BYTES( 0x198); ///< Appears to be unused in official code, possibly reserved for future use. }; diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 589e288df..bd7ea75c2 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp @@ -3,7 +3,16 @@ // Refer to the license.txt file included. #include + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" +#endif #include +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #include #include #include "common/hex_util.h" diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index db0e06ca1..5a7e9f930 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp @@ -454,7 +454,8 @@ private: write_size = std::min(write_size, files.size()); std::vector entries(write_size); std::transform( - files.begin(), files.begin() + write_size, entries.begin(), [](const auto& file) { + files.begin(), files.begin() + static_cast(write_size), entries.begin(), + [](const auto& file) { FileName name{}; std::memcpy(name.data(), file->GetName().data(), std::min(file->GetName().size(), name.size())); -- cgit v1.2.3