Closed vanvught closed 6 years ago
What kind of IDE you used?
arm-none-eabi-gcc -mfpu=vfp -march=armv6zk -mtune=arm1176jzf-s -mcpu=arm1176jzf-s -DRPI1 -DBARE_METAL -DNDEBUG -I./include -I./ioLibrary_Driver/Ethernet -I./../lib-bcm2835/include -I./../lib-debug/include -I./../include -Wall -Werror -O2 -nostartfiles -nostdinc -nostdlib -ffreestanding -mhard-float -mfloat-abi=hard -DWIZCHIP=5100 -c ioLibrary_Driver/Ethernet/socket.c -o build/W5100/ioLibrary_Driver/Ethernet/socket.o ioLibrary_Driver/Ethernet/socket.c: In function ‘_sendto’: ioLibrary_Driver/Ethernet/socket.c:521:36: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] if((taddr == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_IPINVALID; ^ ioLibrary_Driver/Ethernet/socket.c:522:36: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] if((port == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_PORTZERO; ^ cc1: all warnings being treated as errors Makefile:108: recipe for target 'build/W5100/ioLibrary_Driver/Ethernet/socket.o' failed make: *** [build/W5100/ioLibrary_Driver/Ethernet/socket.o] Error 1
pi@nuc-i5:~/workspace/lib-wiznet$ arm-none-eabi-gcc --version arm-none-eabi-gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@khj098765 Please will consider to re-open this issue and fix the bug? Thanks.
@khj098765 Please will consider to re-open this issue and fix the bug? Thanks.
This file cannot be build with -Werror
Ethernet/socket.c: In function 'sendto': Ethernet/socket.c:520:36: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] if((taddr == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_IPINVALID; ^ Ethernet/socket.c:521:36: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] if((port == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_PORTZERO; ^