forked from Mirrors/flatpak-builder
utils: Add and use FLATPAK_VARIANT_DICT_INITIALIZER
This fixes warnings on some versions of glib due to a private struct change.tingping/wmclass
parent
42d2c6a5d6
commit
c756534b19
|
@ -617,7 +617,7 @@ flatpak_builtin_build_export (int argc, char **argv, GCancellable *cancellable,
|
|||
OstreeRepoTransactionStats stats;
|
||||
g_autoptr(OstreeRepoCommitModifier) modifier = NULL;
|
||||
CommitData commit_data = {0};
|
||||
g_auto(GVariantDict) metadata_dict = {0};
|
||||
g_auto(GVariantDict) metadata_dict = FLATPAK_VARIANT_DICT_INITIALIZER;
|
||||
g_autoptr(GVariant) metadata_dict_v = NULL;
|
||||
|
||||
context = g_option_context_new (_("LOCATION DIRECTORY [BRANCH] - Create a repository from a build directory"));
|
||||
|
|
|
@ -1398,7 +1398,7 @@ flatpak_dir_pull_extra_data (FlatpakDir *self,
|
|||
g_autoptr(GFile) root = NULL;
|
||||
g_autoptr(GVariant) extra_data_sources = NULL;
|
||||
g_autoptr(GVariant) detached_metadata = NULL;
|
||||
g_auto(GVariantDict) new_metadata_dict = {0};
|
||||
g_auto(GVariantDict) new_metadata_dict = FLATPAK_VARIANT_DICT_INITIALIZER;
|
||||
g_autoptr(GVariantBuilder) extra_data_builder = NULL;
|
||||
g_autoptr(GVariant) new_detached_metadata = NULL;
|
||||
g_autoptr(GVariant) extra_data = NULL;
|
||||
|
|
|
@ -40,8 +40,10 @@ typedef enum {
|
|||
/* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */
|
||||
#if !GLIB_CHECK_VERSION(2, 49, 3)
|
||||
#define FLATPAK_VARIANT_BUILDER_INITIALIZER {{0,}}
|
||||
#define FLATPAK_VARIANT_DICT_INITIALIZER {{0,}}
|
||||
#else
|
||||
#define FLATPAK_VARIANT_BUILDER_INITIALIZER {{{0,}}}
|
||||
#define FLATPAK_VARIANT_DICT_INITIALIZER {{{0,}}}
|
||||
#endif
|
||||
|
||||
gboolean flatpak_fail (GError **error,
|
||||
|
|
Loading…
Reference in New Issue