diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c
index 7a352e6b..ef95d13c 100644
--- a/src/libostree/ostree-sysroot-cleanup.c
+++ b/src/libostree/ostree-sysroot-cleanup.c
@@ -313,6 +313,7 @@ cleanup_old_deployments (OstreeSysroot       *self,
   if (!list_all_deployment_directories (self, &all_deployment_dirs,
                                         cancellable, error))
     return FALSE;
+  g_assert (all_deployment_dirs); /* Pacify static analysis */
   for (guint i = 0; i < all_deployment_dirs->len; i++)
     {
       OstreeDeployment *deployment = all_deployment_dirs->pdata[i];
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index e17cc233..1c9dbf37 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -945,6 +945,7 @@ ostree_sysroot_load_if_changed (OstreeSysroot  *self,
 
   g_autoptr(GPtrArray) deployments = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
 
+  g_assert (boot_loader_configs); /* Pacify static analysis */
   for (guint i = 0; i < boot_loader_configs->len; i++)
     {
       OstreeBootconfigParser *config = boot_loader_configs->pdata[i];
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index 43eb18b3..0eea09d7 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -772,8 +772,6 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
 
   if (!skip_commit)
     {
-      guint64 timestamp;
-
       if (!opt_no_bindings)
         {
           g_autoptr(GVariant) old_metadata = g_steal_pointer (&metadata);
@@ -782,10 +780,6 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
 
       if (!opt_timestamp)
         {
-          GDateTime *now = g_date_time_new_now_utc ();
-          timestamp = g_date_time_to_unix (now);
-          g_date_time_unref (now);
-
           if (!ostree_repo_write_commit (repo, parent, opt_subject, commit_body, metadata,
                                          OSTREE_REPO_FILE (root),
                                          &commit_checksum, cancellable, error))
@@ -800,8 +794,8 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
                            "Could not parse '%s'", opt_timestamp);
               goto out;
             }
-          timestamp = ts.tv_sec;
 
+          guint64 timestamp = ts.tv_sec;
           if (!ostree_repo_write_commit_with_time (repo, parent, opt_subject, commit_body, metadata,
                                                    OSTREE_REPO_FILE (root),
                                                    timestamp,
diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c
index 5ad3bf38..dea03af4 100644
--- a/src/ostree/ot-builtin-fsck.c
+++ b/src/ostree/ot-builtin-fsck.c
@@ -434,6 +434,7 @@ ostree_builtin_fsck (int argc, char **argv, OstreeCommandInvocation *invocation,
   if (opt_add_tombstones)
     {
       guint i;
+      g_assert (tombstones); /* Pacify static analysis */
       if (tombstones->len)
         {
           if (!ot_enable_tombstone_commits (repo, error))
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;
 
diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c
index 1ef63740..38f3730b 100644
--- a/src/ostree/ot-dump.c
+++ b/src/ostree/ot-dump.c
@@ -125,7 +125,10 @@ dump_commit (GVariant            *variant,
   timestamp = GUINT64_FROM_BE (timestamp);
   str = format_timestamp (timestamp, &local_error);
   if (!str)
-    errx (1, "Failed to read commit: %s", local_error->message);
+    {
+      g_assert (local_error); /* Pacify static analysis */
+      errx (1, "Failed to read commit: %s", local_error->message);
+    }
   g_autofree char *contents = ostree_commit_get_content_checksum (variant) ?: "<invalid commit>";
   g_print ("ContentChecksum:  %s\n", contents);
   g_print ("Date:  %s\n", str);