diff mbox series

[PULL,v3,74/74] exec: Make the MemOp enum cast explicit

Message ID 20240619105419.49303-2-philmd@linaro.org
State Accepted
Commit fc0870c180872d0f40e63507cc6bf8565ffd8d98
Headers show
Series None | expand

Commit Message

Philippe Mathieu-Daudé June 19, 2024, 10:54 a.m. UTC
From: Roman Kiryanov <rkir@google.com>

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>
---
 include/exec/memop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/exec/memop.h b/include/exec/memop.h
index 06417ff361..f881fe7af4 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.  */