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

Warn when running "make" #13

Open
linus-ha opened this issue Nov 23, 2018 · 4 comments
Open

Warn when running "make" #13

linus-ha opened this issue Nov 23, 2018 · 4 comments

Comments

@linus-ha
Copy link

linus-ha commented Nov 23, 2018

linus@XXXXXXX:~/libartnet-1.1.2$ make
make  all-recursive
make[1]: Verzeichnis „/home/linus/libartnet-1.1.2“ wird betreten
Making all in artnet
make[2]: Verzeichnis „/home/linus/libartnet-1.1.2/artnet“ wird betreten
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT artnet.lo -MD -MP -MF .deps/artnet.Tpo -c -o artnet.lo artnet.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT artnet.lo -MD -MP -MF .deps/artnet.Tpo -c artnet.c  -fPIC -DPIC -o .libs/artnet.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT artnet.lo -MD -MP -MF .deps/artnet.Tpo -c artnet.c -o artnet.o >/dev/null 2>&1
mv -f .deps/artnet.Tpo .deps/artnet.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c -o misc.lo misc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c misc.c  -fPIC -DPIC -o .libs/misc.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c misc.c -o misc.o >/dev/null 2>&1
mv -f .deps/misc.Tpo .deps/misc.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT network.lo -MD -MP -MF .deps/network.Tpo -c -o network.lo network.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT network.lo -MD -MP -MF .deps/network.Tpo -c network.c  -fPIC -DPIC -o .libs/network.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT network.lo -MD -MP -MF .deps/network.Tpo -c network.c -o network.o >/dev/null 2>&1
mv -f .deps/network.Tpo .deps/network.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT receive.lo -MD -MP -MF .deps/receive.Tpo -c -o receive.lo receive.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT receive.lo -MD -MP -MF .deps/receive.Tpo -c receive.c  -fPIC -DPIC -o .libs/receive.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT receive.lo -MD -MP -MF .deps/receive.Tpo -c receive.c -o receive.o >/dev/null 2>&1
mv -f .deps/receive.Tpo .deps/receive.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT transmit.lo -MD -MP -MF .deps/transmit.Tpo -c -o transmit.lo transmit.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -Wall -Werror -Wformat -W -g -O2 -MT transmit.lo -MD -MP -MF .deps/transmit.Tpo -c transmit.c  -fPIC -DPIC -o .libs/transmit.o
transmit.c: In function 'artnet_tx_tod_data':
transmit.c:166:5: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
     memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
     ^~~~~~
cc1: all warnings being treated as errors
Makefile:395: recipe for target 'transmit.lo' failed
make[2]: *** [transmit.lo] Error 1
make[2]: Verzeichnis „/home/linus/libartnet-1.1.2/artnet“ wird verlassen
Makefile:423: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Verzeichnis „/home/linus/libartnet-1.1.2“ wird verlassen
Makefile:331: recipe for target 'all' failed
make: *** [all] Error 2

Sorry, I just can't fix the problem myself / understand the problem.

@Duality4Y
Copy link

Duality4Y commented Dec 31, 2018

happens here too (currently running rolling distribution release)
my gcc version: 8.2.1
Does compile on ubuntu, my guess older compiler.

@Duality4Y
Copy link

Can confirm compiles with: gcc-5 (GCC) 5.5.0

@peternewman
Copy link
Member

It looks like that line should probably actually be:
memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT * ARTNET_RDM_UID_WIDTH);

If someone wants to let us know if that works or better yet open a pull request we could get the change merged in.

@dzelionis
Copy link

Yes, that's worked like a charm.
Thanks

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

4 participants