Bug#747182: Conflicting return types (enum vs. int) of function gkm_secret_binary_read
Michael Tautschnig
mt at debian.org
Tue May 6 08:44:35 UTC 2014
Package: gnome-keyring
Version: 3.12.0-2
Usertags: goto-cc
During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.
[...]
libtool: link: gcc -shared -fPIC -DPIC .libs/gkm-secret-standalone.o -Wl,--whole-archive ./.libs/libgkm-secret-store.a ./.libs/libgkm.a -Wl,--no-whole-archive -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgcrypt -O2 -Wl,-z -Wl,relro -Wl,-O1 -Wl,-z -Wl,defs -Wl,--as-needed -pthread -pthread -Wl,-soname -Wl,gkm-secret-store-standalone.so -Wl,-version-script -Wl,.libs/gkm-secret-store-standalone.ver -o .libs/gkm-secret-store-standalone.so
error: conflicting function declarations "gkm_secret_binary_read"
old definition in module gkm-secret-binary file pkcs11/secret-store/gkm-secret-binary.c line 850
signed int (struct _GkmSecretCollection *collection, struct _GkmSecretData *sdata, const void *data, unsigned long int n_data)
new definition in module gkm-secret-collection file pkcs11/secret-store/gkm-secret-binary.h line 29
GkmDataResult (struct _GkmSecretCollection *, struct _GkmSecretData *, const void *, unsigned long int)
Even though the compiler may actually implement the enum via a signed integer,
there is no such guarantee in the C standard. Even more problematic, however, is
the fact that function calling gkm_secret_binary_read will rely on the return
value being one of the enum values - but no such guarantee is provided by the
implementation.
Yet skimming the code it seems the implementation does use GkmDataResult
throughout, so likely just its declaration in gkm-secret-binary.c is wrong.
Best,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20140506/cb7a9271/attachment.sig>
More information about the pkg-gnome-maintainers
mailing list