Skip to contentSkip to conversation

exec: Make the MemOp enum cast explicit

PATCH Applied Roman Kiryanov 3 participants 4 messages Jun 18, 2024 – Jun 19, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 exec: Make the MemOp enum cast explicit

to use the QEMU headers with a C++ compiler.

Google-Bug-Id: 331190993

Change-Id I785f2e65d192287f1f964d2840131b653755648c
---
 include/exec/memop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/memop.h +1 -1
index 06417ff361..f881fe7af4 100644
@@ -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.  */
Signature · 1 line
2.45.2.627.g7a2c4fd464-goog
Reviewed-by on v1 1/3
#1 lore raw
Quoted 14 lines · Roman Kiryanov

to use the QEMU headers with a C++ compiler.

Google-Bug-Id: 331190993

Change-Id I785f2e65d192287f1f964d2840131b653755648c
---
  include/exec/memop.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/memop.h +0 -0
index 06417ff361..f881fe7af4 100644

include/exec/memop.h static inline MemOp size_memop(unsigned size) · line 166

Quoted 7 lines
include/exec/memop.h +1 -1
@@ -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);
  }
 

r~

#3 lore raw
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Roman Kiryanov

to use the QEMU headers with a C++ compiler.

Google-Bug-Id: 331190993

I searched for this on https://developers.google.com/issue-tracker/concepts/searches but no hit, is this public information?

Quoted 9 lines
Quoted 5 lines
Change-Id I785f2e65d192287f1f964d2840131b653755648c

---
  include/exec/memop.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)

and queued, thanks!