|
| 1 | +From 5cef084ec56ee326d3b169c2c83950a017ae02f6 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Duncan Ogilvie < [email protected]> |
| 3 | +Date: Wed, 29 Oct 2025 00:52:58 +0100 |
| 4 | +Subject: [PATCH] Fix narrowing conversion warning |
| 5 | + |
| 6 | +error : constant expression evaluates to -1 which cannot be narrowed to type 'uintb' (aka 'unsigned long long') [-Wc++11-narrowing] |
| 7 | +--- |
| 8 | + Ghidra/Features/Decompiler/src/decompile/cpp/address.cc | 4 ++-- |
| 9 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 10 | + |
| 11 | +diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/address.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/address.cc |
| 12 | +index 9e8039d486e..a939961c371 100644 |
| 13 | +--- a/Ghidra/Features/Decompiler/src/decompile/cpp/address.cc |
| 14 | ++++ b/Ghidra/Features/Decompiler/src/decompile/cpp/address.cc |
| 15 | +@@ -630,8 +630,8 @@ void RangeList::decode(Decoder &decoder) |
| 16 | + #ifdef UINTB4 |
| 17 | + uintb uintbmasks[9] = { 0, 0xff, 0xffff, 0xffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; |
| 18 | + #else |
| 19 | +-uintb uintbmasks[9] = { 0, 0xff, 0xffff, 0xffffff, 0xffffffff, 0xffffffffffLL, |
| 20 | +- 0xffffffffffffLL, 0xffffffffffffffLL, 0xffffffffffffffffLL }; |
| 21 | ++uintb uintbmasks[9] = { 0, 0xff, 0xffff, 0xffffff, 0xffffffff, 0xffffffffffULL, |
| 22 | ++ 0xffffffffffffULL, 0xffffffffffffffULL, 0xffffffffffffffffULL }; |
| 23 | + #endif |
| 24 | + |
| 25 | + /// Treat the given \b val as a constant of \b size bytes |
0 commit comments