From 4387433f3bc125ed8dd08bd974efd8f00fcb5949 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sat, 27 Apr 2024 15:58:59 +0200 Subject: Fix issues reported by cppcheck --- src/restore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/restore.cpp') diff --git a/src/restore.cpp b/src/restore.cpp index 3f5f4cf..c9ace96 100644 --- a/src/restore.cpp +++ b/src/restore.cpp @@ -188,7 +188,8 @@ restore(const OptionsRestore &opts) char *in_buffer = res.in_buffer.get(); for (size_t s = 0; s < in_sectors_read; ++s) { - const uint64_t out_offset = le64toh(*((uint64_t *)in_buffer)); + const uint64_t out_offset = + le64toh(*(reinterpret_cast(in_buffer))); in_buffer += sizeof(uint64_t); if (!res.out_file.seekp(out_offset, std::ios_base::beg)) { -- cgit v1.2.3