]> git.hungrycats.org Git - bees/commitdiff
hexdump: fix pointer cast const mismatch
authorZygo Blaxell <bees@furryterror.org>
Tue, 11 Feb 2025 01:59:34 +0000 (20:59 -0500)
committerZygo Blaxell <bees@furryterror.org>
Tue, 11 Feb 2025 02:00:31 +0000 (21:00 -0500)
Another hit from the exotic compiler collection:  build fails on GCC 9,
from Ubuntu 20...but not later versions of GCC.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
include/crucible/hexdump.h

index 2e099c273e06b9873b543e477dafc0df06a7d36d..6f6526538facd7f768a82f4912bf830066005bc2 100644 (file)
@@ -13,7 +13,7 @@ namespace crucible {
        hexdump(ostream &os, const V &v)
        {
                const auto v_size = v.size();
-               const uint8_t* const v_data = reinterpret_cast<uint8_t*>(v.data());
+               const uint8_t* const v_data = reinterpret_cast<const uint8_t*>(v.data());
                os << "V { size = " << v_size << ", data:\n";
                for (size_t i = 0; i < v_size; i += 8) {
                        string hex, ascii;