[openjk] 21/24: Drop patches that were applied upstream

Simon McVittie smcv at debian.org
Sat Jan 21 21:44:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit bf7ea5a2b8d7b3ca2cf220e7067edb9d4a484c7e
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jan 21 15:31:13 2017 +0000

    Drop patches that were applied upstream
---
 debian/changelog                                   |   1 +
 ...arning-when-sscanf-writes-qboolean-throug.patch | 131 -------------
 ...ntly-use-static-QINLINE-for-inline-C-code.patch |  83 --------
 ...o-in-avoiding-non-C-11-compliant-string-s.patch |  22 ---
 ...-check-some-string-lengths-to-prevent-buf.patch | 208 ---------------------
 debian/patches/series                              |   4 -
 6 files changed, 1 insertion(+), 448 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7eac3ca..89d74aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 openjk (0~20170112+dfsg1-1) UNRELEASED; urgency=medium
 
   * New upstream snapshot
+    - Drop patches that were applied upstream
 
  -- Simon McVittie <smcv at debian.org>  Sat, 21 Jan 2017 15:25:05 +0000
 
diff --git a/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch b/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
deleted file mode 100644
index 532090a..0000000
--- a/debian/patches/Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Thu, 22 Sep 2016 08:29:35 +0100
-Subject: Avoid compiler warning when sscanf writes qboolean through %i
-
-.../code/game/g_client.cpp:760:6: warning: format '%i' expects argument of type 'int*', but argument 26 has type 'qboolean*' [-Wformat=]
-
-Forwarded: https://github.com/JACoders/OpenJK/pull/872
----
- code/game/g_client.cpp    | 36 ++++++++++++++++++++----------------
- code/game/g_session.cpp   |  4 +++-
- codeJK2/game/g_client.cpp |  4 +++-
- 3 files changed, 26 insertions(+), 18 deletions(-)
-
-diff --git a/code/game/g_client.cpp b/code/game/g_client.cpp
-index 278645f..9c05053 100644
---- a/code/game/g_client.cpp
-+++ b/code/game/g_client.cpp
-@@ -696,6 +696,8 @@ static void Player_RestoreFromPrevLevel(gentity_t *ent, SavedGameJustLoaded_e eS
- 
- 		if (strlen(s))	// actually this would be safe anyway because of the way sscanf() works, but this is clearer
- 		{//				|general info				  |-force powers |-saber 1										   |-saber 2										  |-general saber
-+			int saber1BladeActive[8];
-+			int saber2BladeActive[8];
- 			unsigned int saber1BladeColor[8];
- 			unsigned int saber2BladeColor[8];
- 
-@@ -718,14 +720,14 @@ static void Player_RestoreFromPrevLevel(gentity_t *ent, SavedGameJustLoaded_e eS
- 								&client->ps.forcePowerRegenAmount,
- 								//saber 1 data
- 								saber0Name,
--								&client->ps.saber[0].blade[0].active,
--								&client->ps.saber[0].blade[1].active,
--								&client->ps.saber[0].blade[2].active,
--								&client->ps.saber[0].blade[3].active,
--								&client->ps.saber[0].blade[4].active,
--								&client->ps.saber[0].blade[5].active,
--								&client->ps.saber[0].blade[6].active,
--								&client->ps.saber[0].blade[7].active,
-+								&saber1BladeActive[0],
-+								&saber1BladeActive[1],
-+								&saber1BladeActive[2],
-+								&saber1BladeActive[3],
-+								&saber1BladeActive[4],
-+								&saber1BladeActive[5],
-+								&saber1BladeActive[6],
-+								&saber1BladeActive[7],
- 								&saber1BladeColor[0],
- 								&saber1BladeColor[1],
- 								&saber1BladeColor[2],
-@@ -736,14 +738,14 @@ static void Player_RestoreFromPrevLevel(gentity_t *ent, SavedGameJustLoaded_e eS
- 								&saber1BladeColor[7],
- 								//saber 2 data
- 								saber1Name,
--								&client->ps.saber[1].blade[0].active,
--								&client->ps.saber[1].blade[1].active,
--								&client->ps.saber[1].blade[2].active,
--								&client->ps.saber[1].blade[3].active,
--								&client->ps.saber[1].blade[4].active,
--								&client->ps.saber[1].blade[5].active,
--								&client->ps.saber[1].blade[6].active,
--								&client->ps.saber[1].blade[7].active,
-+								&saber2BladeActive[0],
-+								&saber2BladeActive[1],
-+								&saber2BladeActive[2],
-+								&saber2BladeActive[3],
-+								&saber2BladeActive[4],
-+								&saber2BladeActive[5],
-+								&saber2BladeActive[6],
-+								&saber2BladeActive[7],
- 								&saber2BladeColor[0],
- 								&saber2BladeColor[1],
- 								&saber2BladeColor[2],
-@@ -760,7 +762,9 @@ static void Player_RestoreFromPrevLevel(gentity_t *ent, SavedGameJustLoaded_e eS
- 					);
- 			for (int j = 0; j < 8; j++)
- 			{
-+				client->ps.saber[0].blade[j].active = saber1BladeActive[j] ? qtrue : qfalse;
- 				client->ps.saber[0].blade[j].color = (saber_colors_t)saber1BladeColor[j];
-+				client->ps.saber[1].blade[j].active = saber2BladeActive[j] ? qtrue : qfalse;
- 				client->ps.saber[1].blade[j].color = (saber_colors_t)saber2BladeColor[j];
- 			}
- 
-diff --git a/code/game/g_session.cpp b/code/game/g_session.cpp
-index 09f6f60..6cde682 100644
---- a/code/game/g_session.cpp
-+++ b/code/game/g_session.cpp
-@@ -116,6 +116,7 @@ void G_ReadSessionData( gclient_t *client ) {
- 	char	s[MAX_STRING_CHARS];
- 	const char	*var;
- 	int		i;
-+	int		lightsideDisplay;
- 
- 	var = va( "session%i", client - level.clients );
- 	gi.Cvar_VariableStringBuffer( var, s, sizeof(s) );
-@@ -145,8 +146,9 @@ void G_ReadSessionData( gclient_t *client ) {
- 
- 	// Now load the LIGHTSIDE objective. That's the only cross level objective.
- 	sscanf( var, "%i %i",
--		&client->sess.mission_objectives[LIGHTSIDE_OBJ].display,
-+		&lightsideDisplay,
- 		&client->sess.mission_objectives[LIGHTSIDE_OBJ].status);
-+	client->sess.mission_objectives[LIGHTSIDE_OBJ].display = lightsideDisplay ? qtrue : qfalse;
- 
- 	var = va( "missionstats%i", client - level.clients );
- 	gi.Cvar_VariableStringBuffer( var, s, sizeof(s) );
-diff --git a/codeJK2/game/g_client.cpp b/codeJK2/game/g_client.cpp
-index 3522f95..9367b33 100644
---- a/codeJK2/game/g_client.cpp
-+++ b/codeJK2/game/g_client.cpp
-@@ -696,6 +696,7 @@ void Player_RestoreFromPrevLevel(gentity_t *ent)
- 	{
- 		char	s[MAX_STRING_CHARS];
- 		const char	*var;
-+		int saberActive;
- 
- 		gi.Cvar_VariableStringBuffer( sCVARNAME_PLAYERSAVE, s, sizeof(s) );
- 
-@@ -714,11 +715,12 @@ void Player_RestoreFromPrevLevel(gentity_t *ent)
- 								&client->ps.viewangles[2],
- 								&client->ps.forcePowersKnown,
- 								&client->ps.forcePower,
--								&client->ps.saberActive,
-+								&saberActive,
- 								&client->ps.saberAnimLevel,
- 								&client->ps.saberLockEnemy,
- 								&client->ps.saberLockTime
- 					);
-+			client->ps.saberActive = (saberActive ? qtrue : qfalse);
- 			ent->health = client->ps.stats[STAT_HEALTH];
- 
- // slight issue with ths for the moment in that although it'll correctly restore angles it doesn't take into account
diff --git a/debian/patches/Consistently-use-static-QINLINE-for-inline-C-code.patch b/debian/patches/Consistently-use-static-QINLINE-for-inline-C-code.patch
deleted file mode 100644
index d85a4b5..0000000
--- a/debian/patches/Consistently-use-static-QINLINE-for-inline-C-code.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Sun, 25 Sep 2016 22:11:27 +0100
-Subject: Consistently use "static QINLINE" for inline C code
-
-The portable idiom for type-safe macro-like constructs in C is to use
-"static inline" where C99 inline is supported, or "static __inline"
-on compilers that implement that keyword as a compiler-specific
-extension (at least gcc, clang and MSVC do), falling back to just
-"static" as a last resort on terrible compilers from the distant past.
-
-Using "static QINLINE" everywhere means there is no point in defining
-QINLINE to "static inline" on clang, so stop doing that; QINLINE now
-consistently expands to Standard C/C++ inline, or __inline on MSVC,
-or to nothing if we don't know how to inline functions on this
-compiler.
-
-This silences warnings about redundant qualifiers (static static inline)
-for all the functions that were already inline.
-
-There are a couple of uses of non-static QINLINE in C++ code; I've
-left those intact, since inline has different (more useful)
-semantics in C++, and as far as I'm aware all reasonable C++ compilers
-implement it correctly.
-
-Forwarded: https://github.com/JACoders/OpenJK/pull/884
----
- codemp/game/NPC_move.c      | 4 ++--
- codemp/game/bg_pmove.c      | 2 +-
- shared/qcommon/q_platform.h | 6 +-----
- 3 files changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/codemp/game/NPC_move.c b/codemp/game/NPC_move.c
-index 7fe0842..5809909 100644
---- a/codemp/game/NPC_move.c
-+++ b/codemp/game/NPC_move.c
-@@ -95,7 +95,7 @@ NPC_CheckCombatMove
- -------------------------
- */
- 
--QINLINE qboolean NPC_CheckCombatMove( void )
-+static QINLINE qboolean NPC_CheckCombatMove( void )
- {
- 	//return NPCInfo->combatMove;
- 	if ( ( NPCS.NPCInfo->goalEntity && NPCS.NPC->enemy && NPCS.NPCInfo->goalEntity == NPCS.NPC->enemy ) || ( NPCS.NPCInfo->combatMove ) )
-@@ -143,7 +143,7 @@ NPC_GetMoveInformation
- -------------------------
- */
- 
--QINLINE qboolean NPC_GetMoveInformation( vec3_t dir, float *distance )
-+static QINLINE qboolean NPC_GetMoveInformation( vec3_t dir, float *distance )
- {
- 	//NOTENOTE: Use path stacks!
- 
-diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c
-index 9b0b9ee..62ac9c8 100644
---- a/codemp/game/bg_pmove.c
-+++ b/codemp/game/bg_pmove.c
-@@ -259,7 +259,7 @@ qboolean BG_KnockDownable(playerState_t *ps)
- }
- 
- //hacky assumption check, assume any client non-humanoid is a rocket trooper
--qboolean QINLINE PM_IsRocketTrooper(void)
-+static QINLINE qboolean PM_IsRocketTrooper(void)
- {
- 	/*
- 	if (pm->ps->clientNum < MAX_CLIENTS &&
-diff --git a/shared/qcommon/q_platform.h b/shared/qcommon/q_platform.h
-index 9e1067a..4f9ee54 100644
---- a/shared/qcommon/q_platform.h
-+++ b/shared/qcommon/q_platform.h
-@@ -123,11 +123,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
- 		#define OS_STRING "kFreeBSD"
- 	#endif
- 
--	#ifdef __clang__
--		#define QINLINE static inline
--	#else
--		#define QINLINE inline
--	#endif
-+	#define QINLINE inline
- 
- 	#define PATH_SEP '/'
- 
diff --git a/debian/patches/g_svcmds-fix-typo-in-avoiding-non-C-11-compliant-string-s.patch b/debian/patches/g_svcmds-fix-typo-in-avoiding-non-C-11-compliant-string-s.patch
deleted file mode 100644
index b5191aa..0000000
--- a/debian/patches/g_svcmds-fix-typo-in-avoiding-non-C-11-compliant-string-s.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Fri, 28 Oct 2016 10:23:06 +0100
-Subject: g_svcmds: fix typo in avoiding non-C++11-compliant string syntax
-
-Forwarded: https://github.com/JACoders/OpenJK/pull/883
----
- code/game/g_svcmds.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/code/game/g_svcmds.cpp b/code/game/g_svcmds.cpp
-index 1ef8388..6c2174a 100644
---- a/code/game/g_svcmds.cpp
-+++ b/code/game/g_svcmds.cpp
-@@ -581,7 +581,7 @@ void Svcmd_SaberAttackCycle_f( void )
- 		//LIGHTSABERCOMBATSTYLE_TAVION
- 		break;
- 	case SS_STAFF:
--		gi.Printf( S_COLOR_MAGENTA" Lightsaber Combat Style: Staff\n" );
-+		gi.Printf( S_COLOR_MAGENTA "Lightsaber Combat Style: Staff\n" );
- 		//LIGHTSABERCOMBATSTYLE_TAVION
- 		break;
- 	}
diff --git a/debian/patches/savegames-bounds-check-some-string-lengths-to-prevent-buf.patch b/debian/patches/savegames-bounds-check-some-string-lengths-to-prevent-buf.patch
deleted file mode 100644
index a1b04ae..0000000
--- a/debian/patches/savegames-bounds-check-some-string-lengths-to-prevent-buf.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Fri, 28 Oct 2016 11:37:21 +0100
-Subject: savegames: bounds-check some string lengths to prevent buffer
- overflow
-
-Forwarded: https://github.com/JACoders/OpenJK/pull/881
----
- code/game/G_Timer.cpp                | 17 ++++++++++++-----
- code/game/Q3_Interface.cpp           | 15 +++++++++++++++
- code/game/g_roff.cpp                 |  3 +++
- code/icarus/IcarusImplementation.cpp | 34 ++++++++++++++++++++++++----------
- codeJK2/game/Q3_Registers.cpp        | 15 +++++++++++++++
- codeJK2/game/g_roff.cpp              |  5 +++++
- 6 files changed, 74 insertions(+), 15 deletions(-)
-
-diff --git a/code/game/G_Timer.cpp b/code/game/G_Timer.cpp
-index d72f525..192594d 100644
---- a/code/game/G_Timer.cpp
-+++ b/code/game/G_Timer.cpp
-@@ -243,12 +243,19 @@ void TIMER_Load( void )
- 			const char* sg_buffer_data = static_cast<const char*>(
- 				saved_game.get_buffer_data());
- 
--			const int sg_buffer_size = saved_game.get_buffer_size();
-+			int sg_buffer_size = saved_game.get_buffer_size();
- 
--			std::uninitialized_copy_n(
--				sg_buffer_data,
--				sg_buffer_size,
--				tempBuffer);
-+			if (sg_buffer_size < 0 || static_cast<size_t>(sg_buffer_size) >= sizeof(tempBuffer))
-+			{
-+				sg_buffer_size = 0;
-+			}
-+			else
-+			{
-+				std::uninitialized_copy_n(
-+					sg_buffer_data,
-+					sg_buffer_size,
-+					tempBuffer);
-+			}
- 
- 			tempBuffer[sg_buffer_size] = '\0';
- 
-diff --git a/code/game/Q3_Interface.cpp b/code/game/Q3_Interface.cpp
-index 56feeeb..2c740d4 100644
---- a/code/game/Q3_Interface.cpp
-+++ b/code/game/Q3_Interface.cpp
-@@ -7326,6 +7326,11 @@ void CQuake3GameInterface::VariableLoadFloats( varFloat_m &fmap )
- 			INT_ID('F', 'I', 'D', 'L'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('F', 'I', 'D', 'S'),
- 			tempBuffer,
-@@ -7371,6 +7376,11 @@ void CQuake3GameInterface::VariableLoadStrings( int type, varString_m &fmap )
- 			INT_ID('S', 'I', 'D', 'L'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('S', 'I', 'D', 'S'),
- 			tempBuffer,
-@@ -7382,6 +7392,11 @@ void CQuake3GameInterface::VariableLoadStrings( int type, varString_m &fmap )
- 			INT_ID('S', 'V', 'S', 'Z'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer2))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('S', 'V', 'A', 'L'),
- 			tempBuffer2,
-diff --git a/code/game/g_roff.cpp b/code/game/g_roff.cpp
-index fe1f79f..9ec25ad 100644
---- a/code/game/g_roff.cpp
-+++ b/code/game/g_roff.cpp
-@@ -703,6 +703,9 @@ void G_LoadCachedRoffs()
- 			INT_ID('S', 'L', 'E', 'N'),
- 			len);
- 
-+		if (len < 0 || static_cast<size_t>(len) >= sizeof(buffer))
-+			len = 0;
-+
- 		saved_game.read_chunk(
- 			INT_ID('R', 'S', 'T', 'R'),
- 			buffer,
-diff --git a/code/icarus/IcarusImplementation.cpp b/code/icarus/IcarusImplementation.cpp
-index 26004b3..7d2fc8f 100644
---- a/code/icarus/IcarusImplementation.cpp
-+++ b/code/icarus/IcarusImplementation.cpp
-@@ -716,12 +716,19 @@ int CIcarus::Load()
- 	const unsigned char* sg_buffer_data = static_cast<const unsigned char*>(
- 		saved_game.get_buffer_data());
- 
--	const int sg_buffer_size = saved_game.get_buffer_size();
-+	int sg_buffer_size = saved_game.get_buffer_size();
- 
--	std::uninitialized_copy_n(
--		sg_buffer_data,
--		sg_buffer_size,
--		m_byBuffer);
-+	if (sg_buffer_size < 0 || static_cast<size_t>(sg_buffer_size) >= sizeof(m_byBuffer))
-+	{
-+		sg_buffer_size = 0;
-+	}
-+	else
-+	{
-+		std::uninitialized_copy_n(
-+			sg_buffer_data,
-+			sg_buffer_size,
-+			m_byBuffer);
-+	}
- 
- 	//Load all signals
- 	if ( LoadSignals() == false )
-@@ -849,12 +856,19 @@ void CIcarus::BufferRead( void *pDstBuff, unsigned long ulNumBytesToRead )
- 		const unsigned char* sg_buffer_data = static_cast<const unsigned char*>(
- 			saved_game.get_buffer_data());
- 
--		const int sg_buffer_size = saved_game.get_buffer_size();
-+		int sg_buffer_size = saved_game.get_buffer_size();
- 
--		std::uninitialized_copy_n(
--			sg_buffer_data,
--			sg_buffer_size,
--			m_byBuffer);
-+		if (sg_buffer_size < 0 || static_cast<size_t>(sg_buffer_size) >= sizeof(m_byBuffer))
-+		{
-+			sg_buffer_size = 0;
-+		}
-+		else
-+		{
-+			std::uninitialized_copy_n(
-+				sg_buffer_data,
-+				sg_buffer_size,
-+				m_byBuffer);
-+		}
- 
- 		m_ulBytesRead = 0;	//reset buffer
- 	}
-diff --git a/codeJK2/game/Q3_Registers.cpp b/codeJK2/game/Q3_Registers.cpp
-index 7797b5f..25c99cd 100644
---- a/codeJK2/game/Q3_Registers.cpp
-+++ b/codeJK2/game/Q3_Registers.cpp
-@@ -408,6 +408,11 @@ void Q3_VariableLoadFloats( varFloat_m &fmap )
- 			INT_ID('F', 'I', 'D', 'L'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('F', 'I', 'D', 'S'),
- 			tempBuffer,
-@@ -453,6 +458,11 @@ void Q3_VariableLoadStrings( int type, varString_m &fmap )
- 			INT_ID('S', 'I', 'D', 'L'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('S', 'I', 'D', 'S'),
- 			tempBuffer,
-@@ -464,6 +474,11 @@ void Q3_VariableLoadStrings( int type, varString_m &fmap )
- 			INT_ID('S', 'V', 'S', 'Z'),
- 			idSize);
- 
-+		if (idSize < 0 || static_cast<size_t>(idSize) >= sizeof(tempBuffer2))
-+		{
-+			idSize = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('S', 'V', 'A', 'L'),
- 			tempBuffer2,
-diff --git a/codeJK2/game/g_roff.cpp b/codeJK2/game/g_roff.cpp
-index 7eb1bd1..b5c0240 100644
---- a/codeJK2/game/g_roff.cpp
-+++ b/codeJK2/game/g_roff.cpp
-@@ -678,6 +678,11 @@ void G_LoadCachedRoffs()
- 			INT_ID('S', 'L', 'E', 'N'),
- 			len);
- 
-+		if (len < 0 || static_cast<size_t>(len) >= sizeof(buffer))
-+		{
-+			len = 0;
-+		}
-+
- 		saved_game.read_chunk(
- 			INT_ID('R', 'S', 'T', 'R'),
- 			buffer,
diff --git a/debian/patches/series b/debian/patches/series
index e29b43e..858ce4d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,2 @@
 Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
-Consistently-use-static-QINLINE-for-inline-C-code.patch
-Avoid-compiler-warning-when-sscanf-writes-qboolean-throug.patch
-g_svcmds-fix-typo-in-avoiding-non-C-11-compliant-string-s.patch
-savegames-bounds-check-some-string-lengths-to-prevent-buf.patch
 g_utils-disarm-debug-code-that-writes-to-c-nofreeent.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git



More information about the Pkg-games-commits mailing list