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)
This commit is contained in:
Jan Beich 2017-02-01 05:27:05 +00:00
parent ae71612dea
commit 5c65910dd8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432977
3 changed files with 46 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= kajaani-kombat
PORTVERSION= 0.7
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= http://kombat.kajaani.net/dl/

View File

@ -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);

View File

@ -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);