Skip to content

Commit

Permalink
Merge pull request #2952 from cgwalters/silence-variant-lookup
Browse files Browse the repository at this point in the history
tree-wide: Consistently `(void)g_variant_lookup()`
  • Loading branch information
ericcurtin authored Jul 25, 2023
2 parents 250c40a + 13e7ae9 commit af52a88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/libostree/ostree-repo-pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -3548,8 +3548,9 @@ ostree_repo_pull_with_options (OstreeRepo *self, const char *remote_name_or_base
opt_gpg_verify_set = g_variant_lookup (options, "gpg-verify", "b", &pull_data->gpg_verify);
opt_gpg_verify_summary_set
= g_variant_lookup (options, "gpg-verify-summary", "b", &pull_data->gpg_verify_summary);
g_variant_lookup (options, "disable-sign-verify", "b", &disable_sign_verify);
g_variant_lookup (options, "disable-sign-verify-summary", "b", &disable_sign_verify_summary);
(void)g_variant_lookup (options, "disable-sign-verify", "b", &disable_sign_verify);
(void)g_variant_lookup (options, "disable-sign-verify-summary", "b",
&disable_sign_verify_summary);
(void)g_variant_lookup (options, "depth", "i", &pull_data->maxdepth);
(void)g_variant_lookup (options, "disable-static-deltas", "b",
&pull_data->disable_static_deltas);
Expand Down Expand Up @@ -4415,8 +4416,8 @@ ostree_repo_pull_with_options (OstreeRepo *self, const char *remote_name_or_base
if (!collect_available_deltas_for_pull (pull_data, deltas, error))
goto out;

g_variant_lookup (additional_metadata, OSTREE_SUMMARY_INDEXED_DELTAS, "b",
&pull_data->has_indexed_deltas);
(void)g_variant_lookup (additional_metadata, OSTREE_SUMMARY_INDEXED_DELTAS, "b",
&pull_data->has_indexed_deltas);
}

if (pull_data->summary
Expand Down
8 changes: 4 additions & 4 deletions src/libostree/ostree-repo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ repo_create_at_internal (int dfd, const char *path, OstreeRepoMode mode, GVarian

const char *collection_id = NULL;
if (options)
g_variant_lookup (options, "collection-id", "&s", &collection_id);
(void)g_variant_lookup (options, "collection-id", "&s", &collection_id);
if (collection_id != NULL)
g_string_append_printf (config_data, "collection-id=%s\n", collection_id);

Expand Down Expand Up @@ -5806,10 +5806,10 @@ regenerate_metadata (OstreeRepo *self, gboolean do_metadata_commit, GVariant *ad
return glnx_throw (error, "Invalid options doesn't match variant type '%s'",
(const char *)G_VARIANT_TYPE_VARDICT);

g_variant_lookup (options, "gpg-key-ids", "^a&s", &gpg_key_ids);
g_variant_lookup (options, "gpg-homedir", "&s", &gpg_homedir);
(void)g_variant_lookup (options, "gpg-key-ids", "^a&s", &gpg_key_ids);
(void)g_variant_lookup (options, "gpg-homedir", "&s", &gpg_homedir);
sign_keys = g_variant_lookup_value (options, "sign-keys", G_VARIANT_TYPE_ARRAY);
g_variant_lookup (options, "sign-type", "&s", &sign_type);
(void)g_variant_lookup (options, "sign-type", "&s", &sign_type);

if (sign_keys != NULL)
{
Expand Down

0 comments on commit af52a88

Please sign in to comment.