From 8f5d716a71f1dfe50a2902a3ee3334b83c76d805 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 22 Jan 2023 18:21:13 +0100 Subject: [PATCH] shared/install: rework an assert to appease gcc-13 With the previous form, gcc is confused and thinks that .type might be unset. Fixes #26118. --- src/shared/install.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/install.c b/src/shared/install.c index 4eb15ca40e8..51cae3b5a2c 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -342,7 +342,8 @@ void install_changes_dump(int r, const char *verb, const InstallChange *changes, assert(verb || r >= 0); for (size_t i = 0; i < n_changes; i++) { - assert(verb || changes[i].type >= 0); + if (changes[i].type < 0) + assert(verb); assert(changes[i].path); /* When making changes here, make sure to also change install_error() in dbus-manager.c. */ -- 2.47.3