aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-01 13:26:37 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-01 13:26:37 +0800
commit7b28abcafe0062b36b873cd196f1c832264bf6c9 (patch)
treed2c13e6d05f693f310f86b979fac89a3614556a7
parentfcdaabe40587bb9116319cdb7d928c8a99ee1904 (diff)
downloadfreebsd-ports-gnome-7b28abcafe0062b36b873cd196f1c832264bf6c9.tar.gz
freebsd-ports-gnome-7b28abcafe0062b36b873cd196f1c832264bf6c9.tar.zst
freebsd-ports-gnome-7b28abcafe0062b36b873cd196f1c832264bf6c9.zip
games/holotz-castle: unbreak with clang 4.0
JLib/Util/JTextFile.cpp:148:11: error: ordered comparison between pointer and zero ('s8 *' (aka 'char *') and 'int') if (tmp > 0) ~~~ ^ ~ JLib/Util/JTextFile.cpp:156:15: error: ordered comparison between pointer and zero ('s8 *' (aka 'char *') and 'int') if (tmp > 0) ~~~ ^ ~ JLib/Util/JTextFile.cpp:236:8: error: ordered comparison between pointer and zero ('int' and 's8 *' (aka 'char *')) if (0 >= (end = strstr(ptr, "\""))) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ Reported by: antoine (via exp-run)
-rw-r--r--games/holotz-castle/Makefile2
-rw-r--r--games/holotz-castle/files/patch-JLib_JLib_Util_JTextFile.cpp29
2 files changed, 30 insertions, 1 deletions
diff --git a/games/holotz-castle/Makefile b/games/holotz-castle/Makefile
index e74eccaaa255..52cdd6367660 100644
--- a/games/holotz-castle/Makefile
+++ b/games/holotz-castle/Makefile
@@ -3,7 +3,7 @@
PORTNAME= holotz-castle
PORTVERSION= 1.3.14
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= games
MASTER_SITES= SF/nemysisfreebsdp/${CATEGORIES}/${PORTNAME}/
DISTFILES= ${PORTNAME}-${DISTVERSION}-src${EXTRACT_SUFX} \
diff --git a/games/holotz-castle/files/patch-JLib_JLib_Util_JTextFile.cpp b/games/holotz-castle/files/patch-JLib_JLib_Util_JTextFile.cpp
new file mode 100644
index 000000000000..419e33c6286b
--- /dev/null
+++ b/games/holotz-castle/files/patch-JLib_JLib_Util_JTextFile.cpp
@@ -0,0 +1,29 @@
+--- JLib/JLib/Util/JTextFile.cpp.orig 2009-05-02 09:17:15 UTC
++++ JLib/JLib/Util/JTextFile.cpp
+@@ -145,7 +145,7 @@ bool JTextFile::FindNext(const s8 *str,
+
+ tmp = strstr(ptr, str);
+
+- if (tmp > 0)
++ if (tmp)
+ ptr = tmp;
+ else
+ {
+@@ -153,7 +153,7 @@ bool JTextFile::FindNext(const s8 *str,
+ {
+ tmp = strstr(buff, str);
+
+- if (tmp > 0)
++ if (tmp)
+ ptr = tmp;
+ else
+ return false;
+@@ -233,7 +233,7 @@ bool JTextFile::ReadQuotedWord(s8 *str)
+ ++ptr;
+ end = ptr;
+
+- if (0 >= (end = strstr(ptr, "\"")))
++ if ((end = strstr(ptr, "\"")))
+ {
+ // No hay comillas de cierre
+ ptr = org;