pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/kajaani-kombat Fix format strings. Fix ordering ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e4fe4489e7e6
branches:  trunk
changeset: 358251:e4fe4489e7e6
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Feb 08 00:04:53 2017 +0000

description:
Fix format strings. Fix ordering of pointers relative to 0. Bump
revision.

diffstat:

 games/kajaani-kombat/Makefile                       |   4 +-
 games/kajaani-kombat/distinfo                       |   6 ++-
 games/kajaani-kombat/patches/patch-client__net.cpp  |  39 +++++++++++++++++++-
 games/kajaani-kombat/patches/patch-config.cpp       |  15 ++++++++
 games/kajaani-kombat/patches/patch-game__server.cpp |  15 ++++++++
 5 files changed, 73 insertions(+), 6 deletions(-)

diffs (116 lines):

diff -r 454899b61e91 -r e4fe4489e7e6 games/kajaani-kombat/Makefile
--- a/games/kajaani-kombat/Makefile     Wed Feb 08 00:03:30 2017 +0000
+++ b/games/kajaani-kombat/Makefile     Wed Feb 08 00:04:53 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.25 2015/04/25 14:22:57 tnn Exp $
+# $NetBSD: Makefile,v 1.26 2017/02/08 00:04:53 joerg Exp $
 #
 
 DISTNAME=              kajaani-kombat-0.7
-PKGREVISION=           10
+PKGREVISION=           11
 CATEGORIES=            games
 MASTER_SITES=          http://kombat.kajaani.net/dl/
 
diff -r 454899b61e91 -r e4fe4489e7e6 games/kajaani-kombat/distinfo
--- a/games/kajaani-kombat/distinfo     Wed Feb 08 00:03:30 2017 +0000
+++ b/games/kajaani-kombat/distinfo     Wed Feb 08 00:04:53 2017 +0000
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.5 2015/11/03 20:56:53 agc Exp $
+$NetBSD: distinfo,v 1.6 2017/02/08 00:04:53 joerg Exp $
 
 SHA1 (kajaani-kombat-0.7.tar.gz) = a6aa674591fef6445c1dbdba446773e9e3d91c8c
 RMD160 (kajaani-kombat-0.7.tar.gz) = 0f932876dfe5f9f32d9889f0b1720dd9b570b8e2
 SHA512 (kajaani-kombat-0.7.tar.gz) = 84f6923b73c9529fa600c533b5a3de9ea9411f81060c5ad9fb85346fa17c9cb70bf6ba8222319e123372b01286a11b40bb355e8ef8c9bec95cd98f4d0e0460cb
 Size (kajaani-kombat-0.7.tar.gz) = 1805504 bytes
 SHA1 (patch-aa) = bc1ec637e480db4ec499b51d9bd9fabd951b1048
-SHA1 (patch-client__net.cpp) = 547692aff95f540c91ca5ab9602c03f05ceb7557
+SHA1 (patch-client__net.cpp) = d0dfcaf5a7cf6063cb5fb2c23830be9372ae6414
+SHA1 (patch-config.cpp) = d330cbb6a63e814c09fcef5ee88b19a78e9ce7f2
+SHA1 (patch-game__server.cpp) = 8da51acf0732363212f27a12037d53438371e05f
diff -r 454899b61e91 -r e4fe4489e7e6 games/kajaani-kombat/patches/patch-client__net.cpp
--- a/games/kajaani-kombat/patches/patch-client__net.cpp        Wed Feb 08 00:03:30 2017 +0000
+++ b/games/kajaani-kombat/patches/patch-client__net.cpp        Wed Feb 08 00:04:53 2017 +0000
@@ -1,7 +1,42 @@
-$NetBSD: patch-client__net.cpp,v 1.1 2012/11/16 00:50:13 joerg Exp $
+$NetBSD: patch-client__net.cpp,v 1.2 2017/02/08 00:04:53 joerg Exp $
+
+Pointers are not relative to 0.
+Don't shadow local variable.
 
---- client_net.cpp.orig        2012-11-15 15:37:19.000000000 +0000
+--- client_net.cpp.orig        2005-01-22 16:51:34.000000000 +0000
 +++ client_net.cpp
+@@ -31,13 +31,13 @@ client_tcpnet::client_tcpnet(IPaddress *
+   assert (ret != -1);
+ 
+   cond = SDL_CreateCond();
+-  if (cond <0)
++  if (!cond)
+     {
+       fprintf (stderr, "Error creating cond variable\n");
+       exit(2);
+     }
+   mutex = SDL_CreateMutex();
+-  if (mutex < 0)
++  if (!mutex)
+     {
+       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)
+     {
+       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)
+     {
+       fprintf(stderr, "Error starting thread: %s\n", SDL_GetError());
+       exit(2);
 @@ -192,7 +192,7 @@ int client_tcpnet::input_func(void *data
          if (SDLNet_SocketReady(cl->socket) == 0) continue;
          msg *m = 0;
diff -r 454899b61e91 -r e4fe4489e7e6 games/kajaani-kombat/patches/patch-config.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/kajaani-kombat/patches/patch-config.cpp     Wed Feb 08 00:04:53 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-config.cpp,v 1.1 2017/02/08 00:04:53 joerg Exp $
+
+Fix format string to match argument.
+
+--- config.cpp.orig    2017-01-08 19:37:40.160134851 +0000
++++ config.cpp
+@@ -228,7 +228,7 @@ void file_config::read_config( string& f
+         port = ( strlen( v ) ? v : DEFAULT_PORT );
+       }
+       else {
+-        fprintf( stderr," Unknown key/value pair (%s/%s) on line %u\n", key.c_str(), v, linenum );
++        fprintf( stderr," Unknown key/value pair (%s/%s) on line %zu\n", key.c_str(), v, linenum );
+       }
+     }
+     /*
diff -r 454899b61e91 -r e4fe4489e7e6 games/kajaani-kombat/patches/patch-game__server.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/kajaani-kombat/patches/patch-game__server.cpp       Wed Feb 08 00:04:53 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-game__server.cpp,v 1.1 2017/02/08 00:04:53 joerg Exp $
+
+Pointers are not relative to 0.
+
+--- game_server.cpp.orig       2017-01-08 19:35:01.809714788 +0000
++++ 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)
+     {
+       fprintf (stderr, "[SRV] Error starting thread: %s\n", SDL_GetError());
+       exit(2);



Home | Main Index | Thread Index | Old Index