[Debian-ha-maintainers] Bug#746980: Conflicting declarations of function pload_initialize

Michael Tautschnig mt at debian.org
Sun May 4 15:08:43 UTC 2014


Package: corosync
Version: 1.4.6-1
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.

[...]
gcc  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O3 -ggdb3     -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing   -L../lib -Wl,-z,relro   -o corosync-pload corosync-pload.o -lpload -lcoroipcc -lrt -lpthread -ldl 

error: conflicting function declarations "pload_initialize"
old definition in module corosync-pload file ../include/corosync/pload.h line 80
pload_error_t (pload_handle_t *handle, pload_callbacks_t *callbacks)
new definition in module pload file pload.c line 74
unsigned int (pload_handle_t *handle, pload_callbacks_t *callbacks)

where pload_error_t is a typedef name for an enum declared in pload.h. As the
representation of an enum is compiler defined (and will likely be a signed int
in this case), undefined behaviour may arise -- even ignoring the aspect that
other parts of the code may rely on all return values being one of the enum
values rather than being an arbitrary unsigned value.

The appropriate fix likely is using pload_error_t in the definition in pload.c.

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/debian-ha-maintainers/attachments/20140504/08a5bc35/attachment.sig>


More information about the Debian-ha-maintainers mailing list