Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: overflow in conversion from 'long unsigned int' to 'int' when compiling with musl #38

Open
benalb opened this issue May 14, 2020 · 0 comments

Comments

@benalb
Copy link

benalb commented May 14, 2020

trying to compile with Void 5.6.11_1 x86_64-musl, get this:

/home/benalb/tmp/qjoypad/src/joypad.cpp: In member function 'void JoyPad::open(int)': /home/benalb/tmp/qjoypad/src/joypad.cpp:71:23: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '2164288019' to '-2130679277' [-Werror=overflow] 71 | if (ioctl(joydev, JSIOCGNAME(sizeof(id)), id) < 0) { | ^~~~~~~~~~ /home/benalb/tmp/qjoypad/src/joypad.cpp:80:20: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '2147576337' to '-2147390959' [-Werror=overflow] 80 | ioctl (joydev, JSIOCGAXES, &axisCount); | ^~~~~~~~~~ /home/benalb/tmp/qjoypad/src/joypad.cpp:82:20: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '2147576338' to '-2147390958' [-Werror=overflow] 82 | ioctl (joydev, JSIOCGBUTTONS, &buttonCount); | ^~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [src/CMakeFiles/qjoypad.dir/build.make:264: src/CMakeFiles/qjoypad.dir/joypad.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:191: src/CMakeFiles/qjoypad.dir/all] Error 2 make: *** [Makefile:150: all] Error 2

I guess is related to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant