servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

Compile error meshms_cli.c (rasp3+) #116

Closed b0661 closed 7 years ago

b0661 commented 7 years ago

Compile error with gcc on rasp3+ running rasbian stretch: meshms_cli.c: In function ‘app_meshms_list_messages’: meshms_cli.c:166:65: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:175:63: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:186:65: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:195:63: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ cc1: all warnings being treated as errors Makefile:246: recipe for target 'objs_servald/meshms_cli.o' failed make: *** [objs_servald/meshms_cli.o] Error 1

gcc: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.2.0-10+rpi1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 6.2.0 20161027 (Raspbian 6.2.0-10+rpi1)

All ok. when removing -Werror.

Bobby

lakeman commented 7 years ago

Should be fixed by d11fef3

On Sat, Nov 19, 2016 at 1:31 AM, b0661 notifications@github.com wrote:

Compile error with gcc on rasp3+ running rasbian stretch: meshms_cli.c: In function ‘app_meshms_list_messages’: meshms_cli.c:166:65: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:175:63: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:186:65: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ meshms_cli.c:195:63: error: signed and unsigned type in conditional expression [-Werror=sign-compare] cli_put_long(context, iter.timestamp ? (now - iter.timestamp):(long)-1, ":"); ^ cc1: all warnings being treated as errors Makefile:246: recipe for target 'objs_servald/meshms_cli.o' failed make: *** [objs_servald/meshms_cli.o] Error 1

gcc: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/ gcc/arm-linux-gnueabihf/6/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.2.0-10+rpi1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 6.2.0 20161027 (Raspbian 6.2.0-10+rpi1)

All ok. when removing -Werror.

Bobby

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/servalproject/serval-dna/issues/116, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkD3ikjsLWiK10hhQdJ-CNynjSGLrS4ks5q_b3MgaJpZM4K2kdG .