Bug#749615: bumblebee: Conflicting return types of function switcheroo_status

Michael Tautschnig mt at debian.org
Wed May 28 16:20:48 UTC 2014


Package: bumblebee
Version: 3.2.1-5
Severity: wishlist
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and 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 -Wall -Waggregate-return  -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls   -Wshadow -Wstrict-prototypes -Winline -Wformat=2 -pipe   -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -Wextra -funsigned-char -DGITVERSION='"3.2.1"' -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -Wl,-z,relro -o bin/bumblebeed src/pci.o src/bbconfig.o src/bblogger.o src/bbrun.o src/bbsocket.o src/module.o src/bbsecondary.o src/switch/switching.o src/switch/sw_bbswitch.o src/switch/sw_switcheroo.o src/driver.o src/bumblebeed.o -lX11  -lbsd  -lglib-2.0  -lrt 

error: conflicting function declarations "switcheroo_status"
old definition in module switching file src/switch/switching.h line 56
enum switch_state (void)
new definition in module sw_switcheroo file src/switch/sw_switcheroo.c line 37
signed int (void)
Makefile:496: recipe for target 'bin/bumblebeed' failed
make[1]: *** [bin/bumblebeed] Error 64
make[1]: Leaving directory '/srv/jenkins-slave/workspace/sid-goto-cc-bumblebee/bumblebee-3.2.1'
dh_auto_build: make -j1 returned exit code 2
debian/rules:8: recipe for target 'build' failed
make: *** [build] Error 2

The declaration suggests that the implementation might actually return values
other than those prescribed by the enum; yet it really uses only fixed
constants, hence the definition here

http://sources.debian.net/src/bumblebee/3.2.1-5/src/switch/sw_switcheroo.c?hl=37#L37

as well as the type of the "ret" variable should be amended to make sure no such
error creeps in.

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-nvidia-devel/attachments/20140528/58716472/attachment.sig>


More information about the pkg-nvidia-devel mailing list