On 22/02/2023 00.25, Philippe Mathieu-Daudé wrote:
In order to avoid warnings such commit c0a6665c3c ("target/i386:
Remove compilation errors when -Werror=maybe-uninitialized"),
replace all assert(0) and g_assert(0) by g_assert_not_reached().

Remove any code following g_assert_not_reached().

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
...
diff --git a/hw/net/i82596.c b/hw/net/i82596.c
index ec21e2699a..eda0f586fb 100644
--- a/hw/net/i82596.c
+++ b/hw/net/i82596.c
@@ -285,7 +285,7 @@ static void command_loop(I82596State *s)
          case CmdDump:
          case CmdDiagnose:
              printf("FIXME Command %d !!\n", cmd & 7);
-            assert(0);
+            g_assert_not_reached();
          }

While looking at this patch a second time, this hunk caught my eye. It looks like the guest could use these commands to crash QEMU? Should this be a qemu_log_mask(LOG_UNIMP,...) + graceful return instead?

 Thomas


Reply via email to