Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2017 05:27:05 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432977 - in head/games/kajaani-kombat: . files
Message-ID:  <201702010527.v115R5S8087786@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Feb  1 05:27:05 2017
New Revision: 432977
URL: https://svnweb.freebsd.org/changeset/ports/432977

Log:
  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)

Added:
  head/games/kajaani-kombat/files/patch-client__net.cpp   (contents, props changed)
  head/games/kajaani-kombat/files/patch-game__server.cpp   (contents, props changed)
Modified:
  head/games/kajaani-kombat/Makefile   (contents, props changed)

Modified: head/games/kajaani-kombat/Makefile
==============================================================================
--- head/games/kajaani-kombat/Makefile	Wed Feb  1 05:26:51 2017	(r432976)
+++ head/games/kajaani-kombat/Makefile	Wed Feb  1 05:27:05 2017	(r432977)
@@ -3,7 +3,7 @@
 
 PORTNAME=	kajaani-kombat
 PORTVERSION=	0.7
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	games
 MASTER_SITES=	http://kombat.kajaani.net/dl/
 

Added: head/games/kajaani-kombat/files/patch-client__net.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/kajaani-kombat/files/patch-client__net.cpp	Wed Feb  1 05:27:05 2017	(r432977)
@@ -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);

Added: head/games/kajaani-kombat/files/patch-game__server.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/kajaani-kombat/files/patch-game__server.cpp	Wed Feb  1 05:27:05 2017	(r432977)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702010527.v115R5S8087786>