From 7153ab558ac813b963a55abb5f4892fcd2f9ceca Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 28 Aug 2023 16:18:38 -0400 Subject: [PATCH] pkg-builtins: Add assertions to quiet clang-analyzer In theory, the server could have not sent this data. Add assertions to require this. --- src/app/rpmostree-pkg-builtins.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/rpmostree-pkg-builtins.cxx b/src/app/rpmostree-pkg-builtins.cxx index 1ca3564c83..3f18dc0dc0 100644 --- a/src/app/rpmostree-pkg-builtins.cxx +++ b/src/app/rpmostree-pkg-builtins.cxx @@ -386,6 +386,10 @@ rpmostree_builtin_search (int argc, char **argv, RpmOstreeCommandInvocation *inv else if (strcmp (key, "summary") == 0) g_variant_get (value, "s", &summary); } + // The server must have sent these + g_assert (name); + g_assert (query); + g_assert (summary); if (!query_set.count (query)) {