From: Roman Kiryanov Date: Tue, 18 Jun 2024 22:45:28 +0000 (-0700) Subject: exec: Make the MemOp enum cast explicit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fc0870c180872d0f40e63507cc6bf8565ffd8d98;p=qemu.git 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 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240618224528.878425-1-rkir@google.com> Signed-off-by: Philippe Mathieu-Daudé --- 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. */