Closed sebastianbasierski closed 6 years ago
Hi, Thanks for the report! It's now fixed in the latest master. D.
It seems this is still an issue here in master. I also tried building from @rumpeltux 's repo but seemed to get the same problem. Any update on this?
Did you run:
git submodule init
git submodule update
(as indicated in the updated README in above’s commit)?
I had neglected to do that, but still seem to get issues. Using @darsto 's version:
[alarm@alarm brother-scand]$ git submodule init && git submodule update
Submodule 'ber' (https://github.com/darsto/ber.git) registered for path 'ber'
Cloning into '/home/alarm/build/brother-scand/ber'...
Submodule path 'ber': checked out 'a047f4ee06185f99901cb2b0a07733e6874cdf10'
[alarm@alarm brother-scand]$ make
gcc -c -MM -MF build/main.d main.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/main.o main.c
gcc -c -MM -MF build/con_queue.d con_queue.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/con_queue.o con_queue.c
gcc -c -MM -MF build/log.d log.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/log.o log.c
gcc -c -MM -MF build/device_handler.d device_handler.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/device_handler.o device_handler.c
device_handler.c: In function ‘device_handler_add_device’:
device_handler.c:180:9: error: ‘dev’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
free(dev);
^~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:27: build/device_handler.o] Error 1
In a fresh folder with @rumpeltux 's version:
[alarm@alarm brother-scand]$ git submodule init && git submodule update
Submodule 'ber' (https://github.com/darsto/ber.git) registered for path 'ber'
Cloning into '/home/alarm/build/build2/brother-scand/ber'...
Submodule path 'ber': checked out 'a047f4ee06185f99901cb2b0a07733e6874cdf10'
[alarm@alarm brother-scand]$ make
gcc -c -MM -MF build/main.d main.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/main.o main.c
gcc -c -MM -MF build/con_queue.d con_queue.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/con_queue.o con_queue.c
gcc -c -MM -MF build/log.d log.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/log.o log.c
gcc -c -MM -MF build/device_handler.d device_handler.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/device_handler.o device_handler.c
gcc -c -MM -MF build/event_thread.d event_thread.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/event_thread.o event_thread.c
gcc -c -MM -MF build/config.d config.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/config.o config.c
gcc -c -MM -MF build/connection.d connection.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/connection.o connection.c
gcc -c -MM -MF build/data_channel.d data_channel.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/data_channel.o data_channel.c
data_channel.c: In function ‘exchange_params2’:
data_channel.c:562:43: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
if (msg_len < 0 || (unsigned) msg_len != buf - data_channel->buf) {
^~
cc1: all warnings being treated as errors
make: *** [Makefile:27: build/data_channel.o] Error 1
So, either way, I'm still unable to build.
I cannot really reproduce, but you can try make clean; make CFLAGS=
There is a problem with getting driver sources.
Here is a log i got while following installation guideline:
I tried to clone ber with git submodule, but i got:
However cloning ber as standalone project works: