GNOME Bugzilla – Bug 777282
gcr_certificate_chain_build has different type for flags argument in .h & .c
Last modified: 2019-02-22 11:57:40 UTC
Building gcr with the Solaris Studio compiler has these errors: "gcr/gcr-certificate-chain.c", line 706: identifier redeclared: gcr_certificate_chain_build current : function(pointer to struct _GcrCertificateChain {struct _GObject {..} parent, pointer to struct _GcrCertificateChainPrivate {..} pv}, pointer to const char, pointer to const char, enum {GCR_CERTIFICATE_CHAIN_NO_LOOKUPS(1), GCR_CERTIFICATE_CHAIN_NONE(0)}, pointer to struct _GCancellable {struct _GObject {..} parent_instance, pointer to struct _GCancellablePrivate {..} priv}, pointer to pointer to struct _GError {unsigned int domain, int code, pointer to char message}) returning int previous: function(pointer to struct _GcrCertificateChain {struct _GObject {..} parent, pointer to struct _GcrCertificateChainPrivate {..} pv}, pointer to const char, pointer to const char, unsigned int, pointer to struct _GCancellable {struct _GObject {..} parent_instance, pointer to struct _GCancellablePrivate {..} priv}, pointer to pointer to struct _GError {unsigned int domain, int code, pointer to char message}) returning int : "gcr/gcr-certificate-chain.h", line 90 "gcr/gcr-certificate-chain.c", line 776: identifier redeclared: gcr_certificate_chain_build_async current : function(pointer to struct _GcrCertificateChain {struct _GObject {..} parent, pointer to struct _GcrCertificateChainPrivate {..} pv}, pointer to const char, pointer to const char, enum {GCR_CERTIFICATE_CHAIN_NO_LOOKUPS(1), GCR_CERTIFICATE_CHAIN_NONE(0)}, pointer to struct _GCancellable {struct _GObject {..} parent_instance, pointer to struct _GCancellablePrivate {..} priv}, pointer to function(..) returning void, pointer to void) returning void previous: function(pointer to struct _GcrCertificateChain {struct _GObject {..} parent, pointer to struct _GcrCertificateChainPrivate {..} pv}, pointer to const char, pointer to const char, unsigned int, pointer to struct _GCancellable {struct _GObject {..} parent_instance, pointer to struct _GCancellablePrivate {..} priv}, pointer to function(..) returning void, pointer to void) returning void : "gcr/gcr-certificate-chain.h", line 97 In short, these two functions in gcr/gcr-certificate-chain.h declare the fourth argument as "guint flags" but gcr/gcr-certificate-chain.c instead gives the fourth argument as "GcrCertificateChainFlags flags". This appears to have been introduced in commit 1b11a90a when the type was changed from guint to GcrCertificateChainFlags in the .c file, but the .h wasn't updated to match.
That should be commit 1b11a90a in the gcr repo, not the gnome-keyring one that bugzilla tried to point to - i.e. https://git.gnome.org/browse/gcr/commit/?id=1b11a90afead9a0d8f7a3fd830c806b0c116adf3
Created attachment 343510 [details] [review] Patch currently used in Solaris builds
Thanks. Merged into git master.