diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-02-01 13:27:05 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-02-01 13:27:05 +0800 |
commit | fe1c7b6f8a6b6def98dd9e699f3ab3c74eb4e9a1 (patch) | |
tree | be76197644425d07e9713396b0aa2bf5051de52e /games | |
parent | 12ccd7c43595d07ff4275de074d76baca34f8af3 (diff) | |
download | freebsd-ports-gnome-fe1c7b6f8a6b6def98dd9e699f3ab3c74eb4e9a1.tar.gz freebsd-ports-gnome-fe1c7b6f8a6b6def98dd9e699f3ab3c74eb4e9a1.tar.zst freebsd-ports-gnome-fe1c7b6f8a6b6def98dd9e699f3ab3c74eb4e9a1.zip |
games/kajaani-kombat: unbreak with clang 4.0
client_net.cpp:34:12: error: ordered comparison between pointer and zero ('SDL_cond *' and 'int')
if (cond <0)
~~~~ ^~
client_net.cpp:40:13: error: ordered comparison between pointer and zero ('SDL_mutex *' and 'int')
if (mutex < 0)
~~~~~ ^ ~
client_net.cpp:48:16: error: ordered comparison between pointer and zero ('SDL_Thread *' and 'int')
if (trans_th < 0)
~~~~~~~~ ^ ~
client_net.cpp:54:16: error: ordered comparison between pointer and zero ('SDL_Thread *' and 'int')
if (input_th < 0)
~~~~~~~~ ^ ~
game_server.cpp:67:14: error: ordered comparison between pointer and zero ('SDL_Thread *' and 'int')
if (con_th < 0)
~~~~~~ ^ ~
Reported by: antoine (via exp-run)
Diffstat (limited to 'games')
-rw-r--r-- | games/kajaani-kombat/Makefile | 2 | ||||
-rw-r--r-- | games/kajaani-kombat/files/patch-client__net.cpp | 34 | ||||
-rw-r--r-- | games/kajaani-kombat/files/patch-game__server.cpp | 11 |
3 files changed, 46 insertions, 1 deletions
diff --git a/games/kajaani-kombat/Makefile b/games/kajaani-kombat/Makefile index f18393a3d076..80cb992dd2b2 100644 --- a/games/kajaani-kombat/Makefile +++ b/games/kajaani-kombat/Makefile @@ -3,7 +3,7 @@ PORTNAME= kajaani-kombat PORTVERSION= 0.7 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= games MASTER_SITES= http://kombat.kajaani.net/dl/ diff --git a/games/kajaani-kombat/files/patch-client__net.cpp b/games/kajaani-kombat/files/patch-client__net.cpp new file mode 100644 index 000000000000..88d06e89a977 --- /dev/null +++ b/games/kajaani-kombat/files/patch-client__net.cpp @@ -0,0 +1,34 @@ +--- client_net.cpp.orig 2005-01-22 16:51:34 UTC ++++ client_net.cpp +@@ -31,13 +31,13 @@ client_tcpnet::client_tcpnet(IPaddress * + assert (ret != -1); + + cond = SDL_CreateCond(); +- if (cond <0) ++ if (cond == NULL) + { + fprintf (stderr, "Error creating cond variable\n"); + exit(2); + } + mutex = SDL_CreateMutex(); +- if (mutex < 0) ++ if (mutex == NULL) + { + fprintf (stderr, "Error creating mutex\n"); + exit(2); +@@ -45,13 +45,13 @@ client_tcpnet::client_tcpnet(IPaddress * + + active = true; + trans_th = SDL_CreateThread (&client_tcpnet::transf_func, (void *) this); +- if (trans_th < 0) ++ if (trans_th == NULL) + { + fprintf(stderr, "Error starting thread: %s\n", SDL_GetError()); + exit(2); + } + input_th = SDL_CreateThread (&client_tcpnet::input_func, (void *) this); +- if (input_th < 0) ++ if (input_th == NULL) + { + fprintf(stderr, "Error starting thread: %s\n", SDL_GetError()); + exit(2); diff --git a/games/kajaani-kombat/files/patch-game__server.cpp b/games/kajaani-kombat/files/patch-game__server.cpp new file mode 100644 index 000000000000..d9325cf0a9ad --- /dev/null +++ b/games/kajaani-kombat/files/patch-game__server.cpp @@ -0,0 +1,11 @@ +--- game_server.cpp.orig 2005-05-30 10:25:51 UTC ++++ game_server.cpp +@@ -64,7 +64,7 @@ void game_server::init_net() + + // OK, init server thread to listen to clients + con_th = SDL_CreateThread (&game_server::connection_accepter, (void *) this); +- if (con_th < 0) ++ if (con_th == NULL) + { + fprintf (stderr, "[SRV] Error starting thread: %s\n", SDL_GetError()); + exit(2); |