From: Marc-André Lureau Date: Tue, 24 Sep 2024 12:54:34 +0000 (+0400) Subject: qom/object: fix -Werror=maybe-uninitialized X-Git-Tag: v9.2.0-rc0~64^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f3375434d45e56db51b5ecd4d8a929146ba5641;p=thirdparty%2Fqemu.git qom/object: fix -Werror=maybe-uninitialized object_resolve_path_type() sets *ambiguousp only when it is. Fixes: 81c48dd79655 (hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity) Signed-off-by: Marc-André Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- diff --git a/qom/object.c b/qom/object.c index 28c5b66eab5..d3d30035415 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2226,7 +2226,7 @@ Object *object_resolve_path_at(Object *parent, const char *path) Object *object_resolve_type_unambiguous(const char *typename, Error **errp) { - bool ambig; + bool ambig = false; Object *o = object_resolve_path_type("", typename, &ambig); if (ambig) {