lib/deploy: Initialize var to pacify gcc static analysis
authorJonathan Lebon <jonathan@jlebon.com>
Sat, 27 May 2023 14:27:55 +0000 (10:27 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Sat, 27 May 2023 14:38:14 +0000 (10:38 -0400)
Classic case of analysis getting confused by variables initialized by
a function.

src/libostree/ostree-sysroot-deploy.c

index b87866ff34291987e80fe73082e56ee70a5816da..610fde5e6d112c824862a31fd3b2257f637774b4 100644 (file)
@@ -2534,7 +2534,7 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment
           continue;
         }
 
-      guint64 bootdir_size;
+      guint64 bootdir_size = 0;
       if (!get_kernel_layout_size (self, deployment, &bootdir_size, cancellable, error))
         return FALSE;