build: Remove G_GNUC_CONST from *_get_type declarations
authorlzwind <liuzheng@uniontech.com>
Wed, 5 Aug 2026 01:13:34 +0000 (09:13 +0800)
committerlzwind <liuzheng@uniontech.com>
Wed, 5 Aug 2026 01:13:34 +0000 (09:13 +0800)
GLib removed G_GNUC_CONST from its *_get_type declarations to avoid
miscompilations with GCC trunk, and recommends downstream projects do
the same. See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5223

Closes #3612

23 files changed:
src/libostree/ostree-async-progress.h
src/libostree/ostree-bootconfig-parser.h
src/libostree/ostree-bootloader-aboot.h
src/libostree/ostree-bootloader-grub2.h
src/libostree/ostree-bootloader-syslinux.h
src/libostree/ostree-bootloader-uboot.h
src/libostree/ostree-bootloader-zipl.h
src/libostree/ostree-bootloader.h
src/libostree/ostree-chain-input-stream.h
src/libostree/ostree-checksum-input-stream.h
src/libostree/ostree-deployment.h
src/libostree/ostree-fetcher.h
src/libostree/ostree-libarchive-input-stream.h
src/libostree/ostree-lzma-compressor.h
src/libostree/ostree-lzma-decompressor.h
src/libostree/ostree-metalink.h
src/libostree/ostree-mutable-tree.h
src/libostree/ostree-remote.h
src/libostree/ostree-repo-file-enumerator.h
src/libostree/ostree-repo-file.h
src/libostree/ostree-repo-private.h
src/libostree/ostree-tls-cert-interaction-private.h
src/libotutil/ot-checksum-instream.h

index 30068923270ce14ecd041dee34b2fded223ddbbd..dbc5c70e4191ccf64726a86498b0ef0c0dbbeb65 100644 (file)
@@ -45,7 +45,7 @@ struct OstreeAsyncProgressClass
 };
 
 _OSTREE_PUBLIC
-GType ostree_async_progress_get_type (void) G_GNUC_CONST;
+GType ostree_async_progress_get_type (void);
 
 _OSTREE_PUBLIC
 OstreeAsyncProgress *ostree_async_progress_new (void);
index 1ef7b7cb86b582fb5c0c5646fc3df8a04d86922b..944fb5bd21d41000353db2172b842baa5e6dc9e2 100644 (file)
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
 typedef struct _OstreeBootconfigParser OstreeBootconfigParser;
 
 _OSTREE_PUBLIC
-GType ostree_bootconfig_parser_get_type (void) G_GNUC_CONST;
+GType ostree_bootconfig_parser_get_type (void);
 
 _OSTREE_PUBLIC
 OstreeBootconfigParser *ostree_bootconfig_parser_new (void);
index 690220a5cab096cfdce4763a94a15b19e93efc21..e8d3d04d5b8ee4f236f0d1e933a32c2711235a98 100644 (file)
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootloaderAboot OstreeBootloaderAboot;
 
-GType _ostree_bootloader_aboot_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_aboot_get_type (void);
 
 OstreeBootloaderAboot *_ostree_bootloader_aboot_new (OstreeSysroot *sysroot);
 G_END_DECLS
index 8f6c3de5a6c7e23d0d789bd541c2dad2ac8edee0..47a5207dbeef09c21b0f19b554bf10e9e8cb5764 100644 (file)
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootloaderGrub2 OstreeBootloaderGrub2;
 
-GType _ostree_bootloader_grub2_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_grub2_get_type (void);
 
 OstreeBootloaderGrub2 *_ostree_bootloader_grub2_new (OstreeSysroot *sysroot);
 
index 311e962f470bf9d201f8af3b8183f8df13d6cb84..24a3ee190b1397ff8508a6a04dc6089b07c362a3 100644 (file)
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootloaderSyslinux OstreeBootloaderSyslinux;
 
-GType _ostree_bootloader_syslinux_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_syslinux_get_type (void);
 
 OstreeBootloaderSyslinux *_ostree_bootloader_syslinux_new (OstreeSysroot *sysroot);
 
index 8e2ed24fc1efd77eb981a57c3c4abc87450334ae..f79c8e5c2e44221b0b8a5e5198d7863bc75c4a09 100644 (file)
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootloaderUboot OstreeBootloaderUboot;
 
-GType _ostree_bootloader_uboot_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_uboot_get_type (void);
 
 OstreeBootloaderUboot *_ostree_bootloader_uboot_new (OstreeSysroot *sysroot);
 
index 97ba7dd0562204b08ef963bdef0cb383551952c9..b6056bd2a590cc09278a41c8fc64a180f33b17db 100644 (file)
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
 
 typedef struct _OstreeBootloaderZipl OstreeBootloaderZipl;
 
-GType _ostree_bootloader_zipl_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_zipl_get_type (void);
 
 OstreeBootloaderZipl *_ostree_bootloader_zipl_new (OstreeSysroot *sysroot);
 G_END_DECLS
index bb326f5a9a9bb29a88689c9eb9eee01c77ee30df..522a93225771300f0c5ecc44661f79c0eb289542 100644 (file)
@@ -49,7 +49,7 @@ struct _OstreeBootloaderInterface
 };
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeBootloader, g_object_unref)
 
-GType _ostree_bootloader_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_get_type (void);
 
 gboolean _ostree_bootloader_query (OstreeBootloader *bootloader, gboolean *out_is_active,
                                    GCancellable *cancellable, GError **error);
index d639677473fc92ab587ba2c8282aba7d8819a2c1..26e8d005b96f2863b4eca75f42bbf6286c4a5d50 100644 (file)
@@ -64,7 +64,7 @@ struct _OstreeChainInputStreamClass
 };
 
 _OSTREE_PUBLIC
-GType ostree_chain_input_stream_get_type (void) G_GNUC_CONST;
+GType ostree_chain_input_stream_get_type (void);
 
 _OSTREE_PUBLIC
 OstreeChainInputStream *ostree_chain_input_stream_new (GPtrArray *streams);
index 1c5cc3719599c07af3b5dddace73cf267963e609..2e9543b23f3c495db15c3fb432d5b435eb47079a 100644 (file)
@@ -63,7 +63,7 @@ struct _OstreeChecksumInputStreamClass
 };
 
 _OSTREE_PUBLIC
-GType ostree_checksum_input_stream_get_type (void) G_GNUC_CONST;
+GType ostree_checksum_input_stream_get_type (void);
 
 _OSTREE_PUBLIC
 OstreeChecksumInputStream *ostree_checksum_input_stream_new (GInputStream *stream,
index afa71fb2e8ecd66534bd474080f390bf27dfbab1..3d92fd285f951b17a7d15845cd6d1f423139ef08 100644 (file)
@@ -41,7 +41,7 @@ G_BEGIN_DECLS
 typedef struct _OstreeDeployment OstreeDeployment;
 
 _OSTREE_PUBLIC
-GType ostree_deployment_get_type (void) G_GNUC_CONST;
+GType ostree_deployment_get_type (void);
 
 _OSTREE_PUBLIC
 guint ostree_deployment_hash (gconstpointer v);
index 59ae633be26974c93b69b1356a01283e928d868b..52c82122f826a5d38ef7de38efb04b2335322493 100644 (file)
@@ -83,7 +83,7 @@ char *_ostree_fetcher_uri_to_string (OstreeFetcherURI *uri);
 
 gboolean _ostree_fetcher_uri_validate (OstreeFetcherURI *uri, GError **error);
 
-GType _ostree_fetcher_get_type (void) G_GNUC_CONST;
+GType _ostree_fetcher_get_type (void);
 
 OstreeFetcher *_ostree_fetcher_new (int tmpdir_dfd, const char *remote_name,
                                     OstreeFetcherConfigFlags flags);
index 8ab2203894f01374fcbdd495d9def13a789d7bad..0d906c82f5a3c123c6d2ecb43f96859c50ed3d29 100644 (file)
@@ -66,7 +66,7 @@ struct _OstreeLibarchiveInputStreamClass
   void (*_g_reserved5) (void);
 };
 
-GType _ostree_libarchive_input_stream_get_type (void) G_GNUC_CONST;
+GType _ostree_libarchive_input_stream_get_type (void);
 
 GInputStream *_ostree_libarchive_input_stream_new (struct archive *a);
 
index 570bc33eb4dff5c217cc85b261ace90b5649dcad..bcf8457ef2e712bdcdcae6d15ed5eeeef62ed719 100644 (file)
@@ -42,7 +42,7 @@ struct _OstreeLzmaCompressorClass
   GObjectClass parent_class;
 };
 
-GType _ostree_lzma_compressor_get_type (void) G_GNUC_CONST;
+GType _ostree_lzma_compressor_get_type (void);
 
 OstreeLzmaCompressor *_ostree_lzma_compressor_new (GVariant *params);
 
index a60745fe7a4f9eabdce6920ce63bd234207ea5d4..1a73df067ef320399e0d7ff557c02efb898bf3ee 100644 (file)
@@ -44,7 +44,7 @@ struct _OstreeLzmaDecompressorClass
 };
 
 GLIB_AVAILABLE_IN_ALL
-GType _ostree_lzma_decompressor_get_type (void) G_GNUC_CONST;
+GType _ostree_lzma_decompressor_get_type (void);
 
 GLIB_AVAILABLE_IN_ALL
 OstreeLzmaDecompressor *_ostree_lzma_decompressor_new (void);
index a45751555d11e1f0d45cd0d2e6d9d0eff0b29835..20e4643bf209de81d034f85aa53ce99c612f99e8 100644 (file)
@@ -43,7 +43,7 @@ struct OstreeMetalinkClass
 };
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeMetalink, g_object_unref)
 
-GType _ostree_metalink_get_type (void) G_GNUC_CONST;
+GType _ostree_metalink_get_type (void);
 
 OstreeMetalink *_ostree_metalink_new (OstreeFetcher *fetcher, const char *requested_file,
                                       guint64 max_size, OstreeFetcherURI *uri,
index 923b2cd237f194a9a858decc37af9981d0169f73..4564b55bcf8c2e64e48ddcf7b23ef667bd7dc8d6 100644 (file)
@@ -49,7 +49,7 @@ struct OstreeMutableTreeClass
 };
 
 _OSTREE_PUBLIC
-GType ostree_mutable_tree_get_type (void) G_GNUC_CONST;
+GType ostree_mutable_tree_get_type (void);
 
 _OSTREE_PUBLIC
 OstreeMutableTree *ostree_mutable_tree_new (void);
index 066322f8e0a242fa8b388325c6e84c732cf5b8ae..2a1e7be4f90b689ac8ac960064ecce370b5bd8c1 100644 (file)
@@ -44,7 +44,7 @@ G_BEGIN_DECLS
  */
 
 _OSTREE_PUBLIC
-GType ostree_remote_get_type (void) G_GNUC_CONST;
+GType ostree_remote_get_type (void);
 _OSTREE_PUBLIC
 OstreeRemote *ostree_remote_ref (OstreeRemote *remote);
 _OSTREE_PUBLIC
index a67ac9d0651b77ea8600850277441f058c88b46d..e37cbf94931284feeb6593fefff0a255d8cb3531 100644 (file)
@@ -46,7 +46,7 @@ struct _OstreeRepoFileEnumeratorClass
 };
 
 G_GNUC_INTERNAL
-GType _ostree_repo_file_enumerator_get_type (void) G_GNUC_CONST;
+GType _ostree_repo_file_enumerator_get_type (void);
 
 G_GNUC_INTERNAL
 GFileEnumerator *_ostree_repo_file_enumerator_new (OstreeRepoFile *dir, const char *attributes,
index 309e29640c671f2fe3e22146c1f9e67af06aaf9a..77d51ff9e5b91d9f4567863c27ce4e3cfe3d39a1 100644 (file)
@@ -43,7 +43,7 @@ struct _OstreeRepoFileClass
 };
 
 _OSTREE_PUBLIC
-GType ostree_repo_file_get_type (void) G_GNUC_CONST;
+GType ostree_repo_file_get_type (void);
 
 _OSTREE_PUBLIC
 gboolean ostree_repo_file_ensure_resolved (OstreeRepoFile *self, GError **error);
index ddaf5e78883e6b6c55028bcc4570cf993fb5f23c..819842f9f910001ec73d902cb3a3480e29c622f6 100644 (file)
@@ -468,7 +468,7 @@ OstreeRepoAutoTransaction *_ostree_repo_auto_transaction_new (OstreeRepo *repo);
 
 typedef struct OstreeComposefsTarget OstreeComposefsTarget;
 
-GType ostree_composefs_target_get_type (void) G_GNUC_CONST;
+GType ostree_composefs_target_get_type (void);
 OstreeComposefsTarget *ostree_composefs_target_new (void);
 OstreeComposefsTarget *ostree_composefs_target_ref (OstreeComposefsTarget *target);
 void ostree_composefs_target_unref (OstreeComposefsTarget *target);
index 0aca097a8258cc65e1a4f274c60e92e88ee43a74..9c3af5244b1f78b571c0d09963877b4e15d78299 100644 (file)
@@ -40,7 +40,7 @@ typedef struct _OstreeTlsCertInteraction OstreeTlsCertInteraction;
 typedef struct _OstreeTlsCertInteractionClass OstreeTlsCertInteractionClass;
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeTlsCertInteraction, g_object_unref)
 
-GType _ostree_tls_cert_interaction_get_type (void) G_GNUC_CONST;
+GType _ostree_tls_cert_interaction_get_type (void);
 
 OstreeTlsCertInteraction *_ostree_tls_cert_interaction_new (const char *cert_path,
                                                             const char *key_path);
index 096d43c333028b00d4717ce1942aacc34147946d..9e3dbbfe41d97af7fb26cab9ef42d8059e8d68ae 100644 (file)
@@ -52,7 +52,7 @@ struct _OtChecksumInstreamClass
   GFilterInputStreamClass parent_class;
 };
 
-GType ot_checksum_instream_get_type (void) G_GNUC_CONST;
+GType ot_checksum_instream_get_type (void);
 
 OtChecksumInstream *ot_checksum_instream_new (GInputStream *stream, GChecksumType checksum);
 OtChecksumInstream *ot_checksum_instream_new_with_start (GInputStream *stream,