Closed beedaddy closed 4 years ago
Can confirm, same error on debian buster arm64v8
RCSwitch.cpp:388:12: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp: In member function ‘void RCSwitch::enableReceive()’:
RCSwitch.cpp:569:32: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
RCSwitch::nReceivedValue = NULL;
^~~~
RCSwitch.cpp:570:36: warning: converting to non-pointer type ‘unsigned int’ from NULL [-Wconversion-null]
RCSwitch::nReceivedBitlength = NULL;
^~~~
RCSwitch.cpp: In member function ‘bool RCSwitch::available()’:
RCSwitch.cpp:582:38: warning: NULL used in arithmetic [-Wpointer-arith]
return RCSwitch::nReceivedValue != NULL;
^~~~
RCSwitch.cpp: In member function ‘void RCSwitch::resetAvailable()’:
RCSwitch.cpp:586:30: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
RCSwitch::nReceivedValue = NULL;
^~~~
make: *** [<builtin>: RCSwitch.o] Error 1```
Same error:
RCSwitch.cpp: In constructor ‘RCSwitch::RCSwitch()’:
RCSwitch.cpp:41:30: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
RCSwitch::nReceivedValue = NULL;
^~~~
RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordB(int, int, boolean)’:
RCSwitch.cpp:218:12: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordA(char*, int, boolean)’:
RCSwitch.cpp:261:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp:270:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordD(char*, int, boolean)’:
RCSwitch.cpp:335:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp:344:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
^~~~
RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordC(char, int, int, boolean)’:
RCSwitch.cpp:388:12: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
return '\0';
On Raspberry Pi 4
g++ -Wall -lwiringPi -c -o RCSwitch.o RCSwitch.cpp RCSwitch.cpp:31:42: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null] unsigned long RCSwitch::nReceivedValue = NULL; ^~~~ RCSwitch.cpp: In constructor ‘RCSwitch::RCSwitch()’: RCSwitch.cpp:41:30: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null] RCSwitch::nReceivedValue = NULL; ^~~~ RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordB(int, int, boolean)’: RCSwitch.cpp:218:12: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordA(char*, int, boolean)’: RCSwitch.cpp:261:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp:270:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordD(char*, int, boolean)’: RCSwitch.cpp:335:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp:344:14: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp: In member function ‘char* RCSwitch::getCodeWordC(char, int, int, boolean)’: RCSwitch.cpp:388:12: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] return '\0'; ^~~~ RCSwitch.cpp: In member function ‘void RCSwitch::enableReceive()’: RCSwitch.cpp:569:32: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null] RCSwitch::nReceivedValue = NULL; ^~~~ RCSwitch.cpp:570:36: warning: converting to non-pointer type ‘unsigned int’ from NULL [-Wconversion-null] RCSwitch::nReceivedBitlength = NULL; ^~~~ RCSwitch.cpp: In member function ‘bool RCSwitch::available()’: RCSwitch.cpp:582:38: warning: NULL used in arithmetic [-Wpointer-arith] return RCSwitch::nReceivedValue != NULL; ^~~~ RCSwitch.cpp: In member function ‘void RCSwitch::resetAvailable()’: RCSwitch.cpp:586:30: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null] RCSwitch::nReceivedValue = NULL; ^~~~ make: *** [<builtin>: RCSwitch.o] Error 1
not using this anymore for some years now. please try the dev branch where i blindly applied possible fixes.
Does anyone got it now ? I've tried everything but nothing worked
tried a quick & dirty fix in 13055a10c4fec89a21294f557fe24e93d052c3e7 - as I dont have the hardware anymore, I would kindly ask you to report back.
On a RPi3 with a recent Arch Linux ARM running, this doesn't compile (GCC 8.2.0). I get lots of these errors: