diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-02-01 13:27:19 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-02-01 13:27:19 +0800 |
commit | 3cce50e058e999a9881b9895e67264353ac16faa (patch) | |
tree | dba4a0591c8e4c0ddfcbc659bebe2e6a64c519bf | |
parent | fe1c7b6f8a6b6def98dd9e699f3ab3c74eb4e9a1 (diff) | |
download | freebsd-ports-gnome-3cce50e058e999a9881b9895e67264353ac16faa.tar.gz freebsd-ports-gnome-3cce50e058e999a9881b9895e67264353ac16faa.tar.zst freebsd-ports-gnome-3cce50e058e999a9881b9895e67264353ac16faa.zip |
emulators/fceux: unbreak with clang 4.0
fceux-server/server.cpp:117:29: error: ordered comparison between pointer and zero
('char *' and 'int')
while(fgets(buf, 256, fp) > 0)
~~~~~~~~~~~~~~~~~~~ ^ ~
src/cheat.cpp:219:30: error: ordered comparison between pointer and zero ('char *' and 'int')
while(fgets(linebuf,2048,fp)>0)
~~~~~~~~~~~~~~~~~~~~~~^~
Reported by: antoine (via exp-run)
-rw-r--r-- | emulators/fceux/files/patch-fceux-server_server.cpp | 11 | ||||
-rw-r--r-- | emulators/fceux/files/patch-src_cheat.cpp | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/emulators/fceux/files/patch-fceux-server_server.cpp b/emulators/fceux/files/patch-fceux-server_server.cpp new file mode 100644 index 000000000000..817c3c6a6e82 --- /dev/null +++ b/emulators/fceux/files/patch-fceux-server_server.cpp @@ -0,0 +1,11 @@ +--- fceux-server/server.cpp.orig 2012-11-02 13:41:36 UTC ++++ fceux-server/server.cpp +@@ -114,7 +114,7 @@ int LoadConfigFile(char *fn) + if(fp=fopen(fn,"rb")) + { + char buf[256]; +- while(fgets(buf, 256, fp) > 0) ++ while(fgets(buf, 256, fp)) + { + if(!strncasecmp(buf,"maxclients",strlen("maxclients"))) + sscanf(buf,"%*s %d",&ServerConfig.MaxClients); diff --git a/emulators/fceux/files/patch-src_cheat.cpp b/emulators/fceux/files/patch-src_cheat.cpp new file mode 100644 index 000000000000..2d990ab77084 --- /dev/null +++ b/emulators/fceux/files/patch-src_cheat.cpp @@ -0,0 +1,11 @@ +--- src/cheat.cpp.orig 2013-04-13 02:52:13 UTC ++++ src/cheat.cpp +@@ -216,7 +216,7 @@ void FCEU_LoadGameCheats(FILE *override) + } + + FCEU_DispMessage("Cheats file loaded.",0); //Tells user a cheats file was loaded. +- while(fgets(linebuf,2048,fp)>0) ++ while(fgets(linebuf,2048,fp)) + { + char *tbuf=linebuf; + int doc=0; |