Build Failure with gcc-7.1.0
Closed this issue · 1 comments
orbea commented
OS: Slackware64-current
gcc-7.1.0
@ilag11111 Can you take a look at this?
g++ -std=gnu++0x -I. -Ilibco -O0 -g -DSFC_LAGFIX -fPIC -D__LIBRETRO__ -DGIT_VERSION=\"" fcc7244d"\" -DPROFILE_ACCURACY -c sfc/slot/sufamiturbo/sufamiturbo.cpp -o obj/sfc-sufamiturbo-accuracy.o
g++ -std=gnu++0x -I. -Ilibco -O0 -g -DSFC_LAGFIX -fPIC -D__LIBRETRO__ -DGIT_VERSION=\"" fcc7244d"\" -DPROFILE_ACCURACY -c target-libretro/libretro.cpp -o obj/libretro-accuracy.o
target-libretro/libretro.cpp: In function ‘void retro_cheat_set(unsigned int, bool, const char*)’:
target-libretro/libretro.cpp:591:18: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
char *nulstr = '\0';
^~~~
make: *** [Makefile:101: obj/libretro-accuracy.o] Error 1
git bisect failed...
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
a9204c52ef1d254c881bf56fd6ee11a3355d4b14
da026a5bb24831e4035b518ebfd91cb2d7a2177f
879383ee1f546ad99884cf73fce10da43ce7c765
We cannot bisect more
orbea commented
I can build it like this, but I'm not sure this is the correct solution.
index 9d615beb..17841f8f 100644
--- a/target-libretro/libretro.cpp
+++ b/target-libretro/libretro.cpp
@@ -588,7 +588,7 @@ void retro_cheat_set(unsigned index, bool enable, const char *code) {
char *part;
unsigned addr, data;
char addr_str[7], data_str[6];
- char *nulstr = '\0';
+ char *nulstr = (char *)'\0';
if (code == nulstr) return;
strcpy(codeCopy,code);