# HG changeset patch # User Alain Mazy # Date 1778589592 -7200 # Node ID f26e2a26060f98c37ffa28b6d3ed001315d0dc2e # Parent eabb2b48543746780c366f444ec0ae753275fc97 clang-tidy (cont) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Cache/MemoryObjectCache.cpp --- a/OrthancFramework/Sources/Cache/MemoryObjectCache.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryObjectCache.cpp Tue May 12 14:39:52 2026 +0200 @@ -90,7 +90,7 @@ MemoryObjectCache::MemoryObjectCache() : currentSize_(0), - maxSize_(100 * 1024 * 1024) // 100 MB + maxSize_(static_cast(100) * 1024 * 1024) // 100 MB { } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Cache/MemoryStringCache.cpp --- a/OrthancFramework/Sources/Cache/MemoryStringCache.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryStringCache.cpp Tue May 12 14:39:52 2026 +0200 @@ -113,7 +113,7 @@ MemoryStringCache::MemoryStringCache() : currentSize_(0), - maxSize_(100 * 1024 * 1024) // 100 MB + maxSize_(static_cast(100) * 1024 * 1024) // 100 MB { } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/ChunkedBuffer.cpp --- a/OrthancFramework/Sources/ChunkedBuffer.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/ChunkedBuffer.cpp Tue May 12 14:39:52 2026 +0200 @@ -92,7 +92,7 @@ numBytes_(0), pendingPos_(0) { - pendingBuffer_.resize(16 * 1024); // Default size of the pending buffer: 16KB + pendingBuffer_.resize(static_cast(16) * 1024); // Default size of the pending buffer: 16KB } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Compression/GzipCompressor.cpp --- a/OrthancFramework/Sources/Compression/GzipCompressor.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Compression/GzipCompressor.cpp Tue May 12 14:39:52 2026 +0200 @@ -258,7 +258,7 @@ GzipRaii raii(stream); std::string chunk; - chunk.resize(10 * 1024 * 1024); // Read by chunks of 10MB + chunk.resize(static_cast(10) * 1024 * 1024); // Read by chunks of 10MB int ret = Z_OK; diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Compression/ZipReader.cpp --- a/OrthancFramework/Sources/Compression/ZipReader.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Compression/ZipReader.cpp Tue May 12 14:39:52 2026 +0200 @@ -348,7 +348,7 @@ ChunkedBuffer buffer; std::string chunk; - chunk.resize(10 * 1024 * 1024); // Read by chunks of 10MB + chunk.resize(static_cast(10) * 1024 * 1024); // Read by chunks of 10MB for (;;) { diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Compression/ZipWriter.cpp --- a/OrthancFramework/Sources/Compression/ZipWriter.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Compression/ZipWriter.cpp Tue May 12 14:39:52 2026 +0200 @@ -62,9 +62,9 @@ ptime midnight(today); time_duration sinceMidnight = now - midnight; - zfi.tmz_date.tm_sec = static_cast(sinceMidnight.seconds()); // seconds after the minute - [0,59] - zfi.tmz_date.tm_min = static_cast(sinceMidnight.minutes()); // minutes after the hour - [0,59] - zfi.tmz_date.tm_hour = static_cast(sinceMidnight.hours()); // hours since midnight - [0,23] + zfi.tmz_date.tm_sec = static_cast(sinceMidnight.seconds()); // seconds after the minute - [0,59] + zfi.tmz_date.tm_min = static_cast(sinceMidnight.minutes()); // minutes after the hour - [0,59] + zfi.tmz_date.tm_hour = static_cast(sinceMidnight.hours()); // hours since midnight - [0,23] // http://www.boost.org/doc/libs/1_35_0/doc/html/boost/gregorian/greg_day.html zfi.tmz_date.tm_mday = today.day(); // day of the month - [1,31] diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/DicomFormat/DicomIntegerPixelAccessor.cpp --- a/OrthancFramework/Sources/DicomFormat/DicomIntegerPixelAccessor.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomIntegerPixelAccessor.cpp Tue May 12 14:39:52 2026 +0200 @@ -185,7 +185,7 @@ * ..., G1, G2, G3, ..., B1, B2, B3, etc. **/ assert(frameOffset_ % information_.GetChannelCount() == 0); - pixel += channel * frameOffset_ / information_.GetChannelCount() + x * information_.GetBytesPerValue(); + pixel += static_cast(channel) * frameOffset_ / information_.GetChannelCount() + static_cast(x) * information_.GetBytesPerValue(); } else { @@ -195,7 +195,7 @@ * means the order of the pixel values sent shall be R1, G1, B1, * R2, G2, B2, ..., etc. **/ - pixel += channel * information_.GetBytesPerValue() + x * information_.GetChannelCount() * information_.GetBytesPerValue(); + pixel += static_cast(channel) * information_.GetBytesPerValue() + static_cast(x) * information_.GetChannelCount() * information_.GetBytesPerValue(); } uint32_t v; diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Tue May 12 14:39:52 2026 +0200 @@ -25,7 +25,7 @@ #include "../../PrecompiledHeaders.h" #include "DicomTls.h" - +// NOLINTBEGIN(bugprone-reserved-identifier) // This must be *before* the inclusion of "Logging.h" #if defined(__ORTHANC_FILE__) // Prevents the system-wide DCMTK library from leaking the @@ -33,7 +33,7 @@ # undef __FILE__ # define __FILE__ __ORTHANC_FILE__ #endif - +// NOLINTEND(bugprone-reserved-identifier) #include "../../Logging.h" #include "../../OrthancException.h" diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp --- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Tue May 12 14:39:52 2026 +0200 @@ -233,7 +233,7 @@ { // since we cannot report "unlimited", let's claim that we can still write 10MB. // Note that offile_off_t is a signed type. - return 10 * 1024 * 1024; + return static_cast(10) * 1024 * 1024; } offile_off_t write(const void *buf, diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp Tue May 12 14:39:52 2026 +0200 @@ -239,7 +239,7 @@ offset_(0), chunkSize_(0) { - static const size_t CHUNK_SIZE = 64 * 1024; // Use chunks of max 64KB + static const size_t CHUNK_SIZE = static_cast(64) * 1024; // Use chunks of max 64KB chunk_.resize(CHUNK_SIZE); } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp --- a/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/HttpServer/FilesystemHttpSender.cpp Tue May 12 14:39:52 2026 +0200 @@ -27,7 +27,7 @@ #include "../OrthancException.h" #include "../SystemToolbox.h" -static const size_t CHUNK_SIZE = 64 * 1024; // Use 64KB chunks +static const size_t CHUNK_SIZE = static_cast(64) * 1024; // Use 64KB chunks namespace Orthanc { diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/HttpServer/HttpServer.cpp --- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Tue May 12 14:39:52 2026 +0200 @@ -510,7 +510,7 @@ FileBuffer buffer; uint64_t readSoFar = 0; - std::string tmp(1024 * 1024, 0); + std::string tmp(static_cast(1024) * 1024, 0); for (;;) { @@ -550,7 +550,7 @@ bool hasMaxBodySize, size_t maxBodySize) { - static const size_t MAXIMUM_BODY_SIZE_IN_MEMORY = 100 * 1024 * 1024; // 100MB + static const size_t MAXIMUM_BODY_SIZE_IN_MEMORY = static_cast(100) * 1024 * 1024; // 100MB assert(!hasMaxBodySize || maxBodySize > 0); @@ -685,7 +685,7 @@ else { // No Content-Length: This is a chunked transfer. Stream the HTTP connection. - std::string tmp(1024 * 1024, 0); + std::string tmp(static_cast(1024) * 1024, 0); for (;;) { diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/HttpServer/MultipartStreamReader.cpp --- a/OrthancFramework/Sources/HttpServer/MultipartStreamReader.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/HttpServer/MultipartStreamReader.cpp Tue May 12 14:39:52 2026 +0200 @@ -246,7 +246,7 @@ handler_(NULL), headersMatcher_("\r\n\r\n"), boundaryMatcher_("--" + boundary), - blockSize_(10 * 1024 * 1024) + blockSize_(static_cast(10) * 1024 * 1024) { } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Images/Font.cpp --- a/OrthancFramework/Sources/Images/Font.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Images/Font.cpp Tue May 12 14:39:52 2026 +0200 @@ -194,7 +194,7 @@ for (unsigned int cy = top; cy < height; cy++) { - uint8_t* p = reinterpret_cast(target.GetRow(y + cy)) + (x + left) * bpp; + uint8_t* p = reinterpret_cast(target.GetRow(y + cy)) + static_cast(x + left) * bpp; unsigned int pos = cy * character.width_ + left; switch (target.GetFormat()) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Images/ImageAccessor.cpp --- a/OrthancFramework/Sources/Images/ImageAccessor.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Images/ImageAccessor.cpp Tue May 12 14:39:52 2026 +0200 @@ -56,7 +56,7 @@ s = "; "; } - s.reserve(width * 8); + s.reserve(static_cast(width) * 8); for (unsigned int x = 0; x < width; x++, p++) { @@ -85,7 +85,7 @@ const uint8_t* p = reinterpret_cast(source.GetConstRow(y)); std::string s; - s.reserve(width * 3 * 8); + s.reserve(static_cast(width) * 3 * 8); for (unsigned int x = 0; x < 3 * width; x++, p++) { diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Images/ImageProcessing.cpp --- a/OrthancFramework/Sources/Images/ImageProcessing.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Images/ImageProcessing.cpp Tue May 12 14:39:52 2026 +0200 @@ -213,7 +213,7 @@ static void MemsetZeroInternal(ImageAccessor& image) { const unsigned int height = image.GetHeight(); - const size_t lineSize = image.GetBytesPerPixel() * image.GetWidth(); + const size_t lineSize = static_cast(image.GetBytesPerPixel()) * image.GetWidth(); const size_t pitch = image.GetPitch(); uint8_t *p = reinterpret_cast(image.GetBuffer()); diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/Images/PngWriter.cpp --- a/OrthancFramework/Sources/Images/PngWriter.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/Images/PngWriter.cpp Tue May 12 14:39:52 2026 +0200 @@ -141,7 +141,7 @@ rows_.resize(height); for (unsigned int y = 0; y < height; y++) { - rows_[y] = const_cast(reinterpret_cast(buffer)) + y * pitch; + rows_[y] = const_cast(reinterpret_cast(buffer)) + static_cast(y) * pitch; } switch (format) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/JobsEngine/SetOfCommandsJob.cpp --- a/OrthancFramework/Sources/JobsEngine/SetOfCommandsJob.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/JobsEngine/SetOfCommandsJob.cpp Tue May 12 14:39:52 2026 +0200 @@ -304,8 +304,8 @@ { commands_[i] = unserializer->Unserialize(tmp[i]); } - catch (OrthancException&) - { + catch (OrthancException&) // NOLINT(bugprone-empty-catch) + { // ignore the command if it cannot be unserialized } if (commands_[i] == NULL) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/Sources/SystemToolbox.cpp --- a/OrthancFramework/Sources/SystemToolbox.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/Sources/SystemToolbox.cpp Tue May 12 14:39:52 2026 +0200 @@ -169,7 +169,7 @@ barrierEvent_ = ServerBarrierEvent_Stop; while (!(*stopFlag || finish_)) { - SystemToolbox::USleep(100 * 1000); + SystemToolbox::USleep(100ull * 1000ull); } #if defined(_WIN32) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp --- a/OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/UnitTestsSources/FromDcmtkTests.cpp Tue May 12 14:39:52 2026 +0200 @@ -986,7 +986,7 @@ { const void* a = image.GetConstRow(y); const void* b = decoded->GetConstRow(y); - ASSERT_EQ(0, memcmp(a, b, 3 * 384)); + ASSERT_EQ(0, memcmp(a, b, static_cast(3) * 384)); } } } diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/UnitTestsSources/ImageProcessingTests.cpp --- a/OrthancFramework/UnitTestsSources/ImageProcessingTests.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/UnitTestsSources/ImageProcessingTests.cpp Tue May 12 14:39:52 2026 +0200 @@ -301,7 +301,7 @@ { ImageAccessor& image = this->GetImage(); - memset(image.GetBuffer(), 128, image.GetHeight() * image.GetWidth()); + memset(image.GetBuffer(), 128, static_cast(image.GetHeight()) * image.GetWidth()); switch (image.GetFormat()) { @@ -338,7 +338,7 @@ { ImageAccessor& image = this->GetImage(); - memset(image.GetBuffer(), 128, image.GetHeight() * image.GetWidth()); + memset(image.GetBuffer(), 128, static_cast(image.GetHeight()) * image.GetWidth()); float c = 0.0f; for (unsigned int y = 0; y < image.GetHeight(); y++) diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/UnitTestsSources/RestApiTests.cpp --- a/OrthancFramework/UnitTestsSources/RestApiTests.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/UnitTestsSources/RestApiTests.cpp Tue May 12 14:39:52 2026 +0200 @@ -1165,7 +1165,7 @@ TEST(ChunkedBuffer, DISABLED_Large) { - const size_t LARGE = 60 * 1024 * 1024; + const size_t LARGE = static_cast(60) * 1024 * 1024; ChunkedBuffer b; for (size_t i = 0; i < LARGE; i++) @@ -1342,7 +1342,7 @@ w.SetUrl("http://localhost:5000"); // This is slow in Orthanc <= 1.5.8 (issue 156) - TotoBody body(600 * 1024 * 1024, 6 * 1024 * 1024 - 17); + TotoBody body(static_cast(600) * 1024 * 1024, static_cast(6) * 1024 * 1024 - 17); HttpClient c(w, "toto"); c.SetMethod(HttpMethod_Post); @@ -1370,7 +1370,7 @@ w.SetUrl("http://localhost:5000"); // This crashes Orthanc 1.6.0 to 1.7.2 - TotoBody body(32 * 1024, 1); + TotoBody body(static_cast(32) * 1024, static_cast(1)); HttpClient c(w, "toto"); c.SetMethod(HttpMethod_Post); diff -r eabb2b485437 -r f26e2a26060f OrthancFramework/UnitTestsSources/ZipTests.cpp --- a/OrthancFramework/UnitTestsSources/ZipTests.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancFramework/UnitTestsSources/ZipTests.cpp Tue May 12 14:39:52 2026 +0200 @@ -236,7 +236,7 @@ std::string memory; std::string large; - large.resize(4 * 65536); + large.resize(static_cast(4) * 65536); for (size_t i = 0; i < large.size(); i++) { large[i] = static_cast(rand() % 256); diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp --- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp Tue May 12 14:39:52 2026 +0200 @@ -36,13 +36,15 @@ #include - +// NOLINTBEGIN(bugprone-macro-parentheses) #define CHECK_FUNCTION_EXISTS(backend, func) \ if (backend.func == NULL) \ { \ throw OrthancException( \ ErrorCode_DatabasePlugin, "Missing primitive: " #func "()"); \ } +// NOLINTEND(bugprone-macro-parentheses) + namespace Orthanc { diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Resources/orthanc.clang-tidy --- a/OrthancServer/Resources/orthanc.clang-tidy Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Resources/orthanc.clang-tidy Tue May 12 14:39:52 2026 +0200 @@ -12,7 +12,6 @@ -bugprone-easily-swappable-parameters, -bugprone-branch-clone, -bugprone-suspicious-include, - -bugprone-implicit-widening-of-multiplication-result, -bugprone-exception-escape, -performance-*, -readability-*, diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/Database/Compatibility/GenericFind.cpp --- a/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp Tue May 12 14:39:52 2026 +0200 @@ -133,7 +133,7 @@ } else if (request.GetLimitsCount() != 0) { - compatibilityTransaction_.GetAllPublicIdsCompatibility(identifiers, request.GetLevel(), request.GetLimitsSince(), request.GetLimitsCount()); + compatibilityTransaction_.GetAllPublicIdsCompatibility(identifiers, request.GetLevel(), static_cast(request.GetLimitsSince()), request.GetLimitsCount()); } else { diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue May 12 14:39:52 2026 +0200 @@ -1683,7 +1683,7 @@ return; } - static const uint64_t MEGA_BYTES = 1024 * 1024; + static const uint64_t MEGA_BYTES = 1024ull * 1024ull; std::string publicId = call.GetUriComponent("id", ""); diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue May 12 14:39:52 2026 +0200 @@ -241,7 +241,7 @@ return; } - static const uint64_t MEGA_BYTES = 1024 * 1024; + static const uint64_t MEGA_BYTES = 1024ull * 1024ull; uint64_t diskSize, uncompressedSize, countPatients, countStudies, countSeries, countInstances; OrthancRestApi::GetIndex(call).GetGlobalStatistics(diskSize, uncompressedSize, countPatients, diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/Search/DatabaseLookup.cpp --- a/OrthancServer/Sources/Search/DatabaseLookup.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/Search/DatabaseLookup.cpp Tue May 12 14:39:52 2026 +0200 @@ -361,7 +361,7 @@ if (constraints_[i]->GetTag() == tag) { delete constraints_[i]; - constraints_.erase(constraints_.begin() + i); + constraints_.erase(constraints_.begin() + static_cast::difference_type>(i)); } } } diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue May 12 14:39:52 2026 +0200 @@ -64,7 +64,7 @@ # include #endif -static size_t DICOM_CACHE_SIZE = 128 * 1024 * 1024; // 128 MB +static size_t DICOM_CACHE_SIZE = static_cast(128) * 1024 * 1024; // 128 MB /** @@ -133,7 +133,7 @@ // (see OrthancServer/Resources/ImplementationNotes/memory_consumption.txt) { MetricsRegistry::Timer timer(that->GetMetricsRegistry(), "orthanc_memory_trimming_duration_ms"); - malloc_trim(128*1024); + malloc_trim(static_cast(128) * 1024); } lastExecution = boost::posix_time::second_clock::universal_time(); } @@ -1547,7 +1547,7 @@ // Release the throttle if loading "small" DICOM files (under // 50MB, which is an arbitrary value) - if (buffer_.size() < 50 * 1024 * 1024) + if (buffer_.size() < static_cast(50) * 1024 * 1024) { largeDicomLocker_.reset(NULL); } diff -r eabb2b485437 -r f26e2a26060f OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp --- a/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Tue May 12 14:39:52 2026 +0200 @@ -241,7 +241,7 @@ value["Transcode"] = GetTransferSyntaxUid(transferSyntax_); } - static const uint64_t MEGA_BYTES = 1024 * 1024; + static const uint64_t MEGA_BYTES = 1024ull * 1024ull; value["Size"] = boost::lexical_cast(size_); value["SizeMB"] = static_cast(size_ / MEGA_BYTES); } diff -r eabb2b485437 -r f26e2a26060f OrthancServer/UnitTestsSources/UnitTestsMain.cpp --- a/OrthancServer/UnitTestsSources/UnitTestsMain.cpp Mon May 11 19:41:52 2026 +0200 +++ b/OrthancServer/UnitTestsSources/UnitTestsMain.cpp Tue May 12 14:39:52 2026 +0200 @@ -131,7 +131,7 @@ TEST(FontRegistry, Basic) { Orthanc::Image s(Orthanc::PixelFormat_RGB24, 640, 480, false); - memset(s.GetBuffer(), 0, s.GetPitch() * s.GetHeight()); + memset(s.GetBuffer(), 0, static_cast(s.GetPitch()) * s.GetHeight()); { Orthanc::OrthancConfiguration::ReaderLock lock;