-
Notifications
You must be signed in to change notification settings - Fork 40
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 Compiling #20
Comments
Hi @DirkDev, Seems like I ran into this error at one point before. Let me pull up my notes and see if I can locate the resolution. |
Many thanks in advance Dirk On Mon, Aug 24, 2015 at 4:55 PM, Jason Gullickson [email protected]
|
Hi, I have an EtherTen module and also had the same issue as above, is there any advice as to what needs to be done to get the code to compile? BRJ. |
Same issue here. Is there any resolution? To re-produce:
Errors:
|
Thanks for the feedback @carltstein. No resolution at the moment (I don't have a Windows machine to test this on). Could it be a compatibility problem with the EthernetBonjour library on Windows? Do you know if any other sketches which use that library compile on your setup? |
@jjg Got same Problem on Windows. |
It seems like a problem with the libraries because the signature of Tried many different libs but not getting it to work. Found a working version by myself. It is Arduino 1.0.5. Best Regards. |
Here's the cause of the error: Note that with recent versions of Arduino AVR Boards this has been downgraded from an error to a warning due to the addition of the
|
Hi,
I have an UNO r3 with an ethernet shield. When compiling I get below error.
To be honest, I have no idea how to start with this error. Hoping you can help me.
warning: NULL used in arithmetic [-Wpointer-arith]
Many thanks in advance!
Dirk
Arduino: 1.6.5 (Windows 7), Board: "Arduino Uno"
Build options changed, rebuilding all
Using library EthernetBonjour in folder: C:\Program Files (x86)\Arduino\libraries\EthernetBonjour (legacy)
Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library Ethernet in folder: C:\Program Files (x86)\Arduino\libraries\Ethernet
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src C:\Users\dirk\AppData\Local\Temp\build1197526729768169677.tmp\RESTduino.cpp -o C:\Users\dirk\AppData\Local\Temp\build1197526729768169677.tmp\RESTduino.cpp.o
RESTduino.ino: In function 'void loop()':
RESTduino.ino:229:31: warning: NULL used in arithmetic [-Wpointer-arith]
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp -o C:\Users\dirk\AppData\Local\Temp\build1197526729768169677.tmp\EthernetBonjour\EthernetBonjour.cpp.o
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'int EthernetBonjourClass::_startMDNSSession()':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:291:94: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (ethernet_compat_socket(this->_socket, ECSnMrUDP, MDNS_SERVER_PORT, ECSnMrMulticast) < 0)
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'int EthernetBonjourClass::_closeMDNSSession()':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:306:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_sendMDNSMessage(uint32_t, uint32_t, int, int)':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:527:1: warning: label 'errorReturn' defined but not used [-Wunused-label]
errorReturn:
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: At global scope:
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:311:13: warning: unused parameter 'peerAddress' [-Wunused-parameter]
MDNSError_t EthernetBonjourClass::_sendMDNSMessage(uint32_t peerAddress, uint32_t xid, int type,
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:311:13: warning: unused parameter 'serviceRecord' [-Wunused-parameter]
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_processMDNSQuery()':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:602:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i=0; i<qCnt; i++) {
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:656:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:552:44: warning: variable 'aCnt' set but not used [-Wunused-but-set-variable]
uint16_t peer_port, udp_len, ptr, qCnt, aCnt, aaCnt, addCnt;
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:552:50: warning: variable 'aaCnt' set but not used [-Wunused-but-set-variable]
uint16_t peer_port, udp_len, ptr, qCnt, aCnt, aaCnt, addCnt;
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:552:57: warning: variable 'addCnt' set but not used [-Wunused-but-set-variable]
uint16_t peer_port, udp_len, ptr, qCnt, aCnt, aaCnt, addCnt;
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1079:96: warning: 'peer_addr' may be used uninitialized in this function -Wmaybe-uninitializedthis->_sendMDNSMessage(peer_addr, xid, (int)MDNSPacketTypeServiceRecord, j-2);
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1079:96: warning: 'xid' may be used uninitialized in this function [-Wmaybe-uninitialized]
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc -c -g -Os -Wall -Wextra -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetUtil.c -o C:\Users\dirk\AppData\Local\Temp\build1197526729768169677.tmp\EthernetBonjour\utility\EthernetUtil.c.o
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetUtil.c:64:0: warning: ignoring #pragma mark [-Wunknown-pragmas]
#pragma mark -
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetUtil.c:65:0: warning: ignoring #pragma mark Private [-Wunknown-pragmas]
#pragma mark Private
^
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src -IC:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp -o C:\Users\dirk\AppData\Local\Temp\build1197526729768169677.tmp\EthernetBonjour\utility\EthernetCompat.cpp.o
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp: In function 'uint16_t ethernet_compat_write_private(uint16_t, uint8_t_, uint16_t)':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<len; i++) {
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp: At global scope:
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp:66:6: warning: unused parameter 'rxtx_bufsize' [-Wunused-parameter]
void ethernet_compat_init(uint8_t macAddr, uint8_t* ipAddr, uint16_t rxtx_bufsize)
^
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp: In function 'void ethernet_compat_read_data(int, uint8_t_, uint8_t_, uint16_t)':
C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp:121:41: error: invalid conversion from 'uint8_t* {aka unsigned char_}' to 'uint16_t {aka unsigned int}' [-fpermissive]
W5100.read_data(socket, src, dst, len);
^
In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,
from C:\Program Files (x86)\Arduino\libraries\EthernetBonjour\utility\EthernetCompat.cpp:27:
C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:148:8: error: initializing argument 2 of 'void W5100Class::read_data(SOCKET, uint16_t, volatile uint8_t_, uint16_t)' [-fpermissive]
void read_data(SOCKET s, volatile uint16_t src, volatile uint8_t * dst, uint16_t len);
^
Error compiling.
The text was updated successfully, but these errors were encountered: