From 05766d7b8bc0ba6c21d61d15334151a977c1539f Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sat, 16 Dec 2023 12:04:09 +0100 Subject: [PATCH] testing3 --- cpp/devices/disk_track.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/devices/disk_track.cpp b/cpp/devices/disk_track.cpp index 6fc34384..86278014 100644 --- a/cpp/devices/disk_track.cpp +++ b/cpp/devices/disk_track.cpp @@ -21,7 +21,7 @@ DiskTrack::~DiskTrack() { // Release memory, but do not save automatically - free(dt.buffer); // NOSONAR free() must be used here because of allocation with posix_memalign + free(dt.buffer); // d here because of allocation with posix_memalign } void DiskTrack::Init(int track, int size, int sectors, bool raw, off_t imgoff) @@ -88,7 +88,7 @@ bool DiskTrack::Load(const string &path, uint64_t &cache_miss_read_count) // Reallocate if the buffer length is different if (dt.length != static_cast(length)) { - free(dt.buffer); // NOSONAR free() must be used here because of allocation with posix_memalign + free(dt.buffer); // free() must be used here because of allocation with posix_memalign if (posix_memalign((void**)&dt.buffer, 512, ((length + 511) / 512) * 512)) { spdlog::warn("posix_memalign failed"); } @@ -211,7 +211,7 @@ bool DiskTrack::Save(const string &path, uint64_t &cache_miss_write_count) } // Drop the change flag and exit - fill(dt.changemap.begin(), dt.changemap.end(), false); // NOSONAR ranges::fill() cannot be applied to vector + fill(dt.changemap.begin(), dt.changemap.end(), false); // ranges::fill() cannot be applied to vector dt.changed = false; return true;