aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2024-06-18 15:45:28 -0700
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-19 12:52:21 +0200
commitfc0870c180872d0f40e63507cc6bf8565ffd8d98 (patch)
treee71beaeef6c2dbcb179b039c6a0c541d41c438f6
parentabd749b517827b3da38230f50a82a94fccfaddac (diff)
downloadqemu-fc0870c180872d0f40e63507cc6bf8565ffd8d98.zip
qemu-fc0870c180872d0f40e63507cc6bf8565ffd8d98.tar.gz
qemu-fc0870c180872d0f40e63507cc6bf8565ffd8d98.tar.bz2
exec: Make the MemOp enum cast explicit
Make the MemOp enum cast explicit to use the QEMU headers with a C++ compiler. Signed-off-by: Roman Kiryanov <rkir@google.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240618224528.878425-1-rkir@google.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--include/exec/memop.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/exec/memop.h b/include/exec/memop.h
index 06417ff..f881fe7 100644
--- a/include/exec/memop.h
+++ b/include/exec/memop.h
@@ -161,7 +161,7 @@ static inline MemOp size_memop(unsigned size)
/* Power of 2 up to 8. */
assert((size & (size - 1)) == 0 && size >= 1 && size <= 8);
#endif
- return ctz32(size);
+ return (MemOp)ctz32(size);
}
/* Big endianness from MemOp. */