Package: bfgminer
Version: 3.10.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.

[...]
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -fno-strict-aliasing -I./lib -I./lib 
-I/usr/include/libusb-1.0 -DCGMINER_PREFIX='"/usr/share/bfgminer"' -pthread   
-I/usr/include/libblkmaker-0.1     -D_FORTIFY_SOURCE=2  -g -O2 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c 
-o bfgminer-miner.o `test -f 'miner.c' || echo './'`miner.c

file miner.c line 2553 function calc_midstate: in expression `(void)0':
conversion from `void' to `void *': implicit conversion not permitted
CONVERSION ERROR
make[3]: *** [bfgminer-miner.o] Error 64
make[3]: Leaving directory 
`/srv/jenkins-slave/workspace/sid-goto-cc-bfgminer/bfgminer-3.10.0'
make[2]: *** [all-recursive] Error 1

The reason for the error lies in the macro definitions of swap32tole (and the
same applies for swap32tobe):

http://sources.debian.net/src/bfgminer/3.10.0-2/miner.h?hl=724,731#L724

The C standard requires that both the true and false case of a conditional
operator have the same type. Here, however, the true case has type void, whereas
the false case has void*. Either of the cases need to be amended to ensure
well-defined behaviour.

Best,
Michael

Attachment: pgpCHxKjKK9Rj.pgp
Description: PGP signature

Reply via email to