From 946659aacf08bc238e3ceda4475a855c165b06c5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 16 Oct 2019 13:48:20 +0000 Subject: [PATCH] prune: [scan-build] Initialize a variable Another false positive because we only read this if `opt_keep_younger_than` is `TRUE`, but let's initialize variables on general principle. --- src/ostree/ot-builtin-prune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ostree/ot-builtin-prune.c b/src/ostree/ot-builtin-prune.c index 2f560d14..fd2ab05f 100644 --- a/src/ostree/ot-builtin-prune.c +++ b/src/ostree/ot-builtin-prune.c @@ -205,7 +205,7 @@ ostree_builtin_prune (int argc, char **argv, OstreeCommandInvocation *invocation g_autoptr(GHashTable) all_refs = NULL; g_autoptr(GHashTable) reachable = ostree_repo_traverse_new_reachable (); g_autoptr(GHashTable) retain_branch_depth = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); - struct timespec keep_younger_than_ts; + struct timespec keep_younger_than_ts = {0, }; GHashTableIter hash_iter; gpointer key, value;