From ee98d13de990b0495ba49bb21673636c37760d9fc2c6417400211acb65258e80 Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Fri, 5 May 2023 18:19:03 +0000 Subject: [PATCH] Accepting request 1085153 from home:jaimeMF:branches:games - Add fix_maybe-uninitialized_error.patch OBS-URL: https://build.opensuse.org/request/show/1085153 OBS-URL: https://build.opensuse.org/package/show/games/vkquake?expand=0&rev=36 --- fix_maybe-uninitialized_error.patch | 36 +++++++++++++++++++++++++++++ vkquake.changes | 5 ++++ vkquake.spec | 4 +++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 fix_maybe-uninitialized_error.patch diff --git a/fix_maybe-uninitialized_error.patch b/fix_maybe-uninitialized_error.patch new file mode 100644 index 0000000..96db394 --- /dev/null +++ b/fix_maybe-uninitialized_error.patch @@ -0,0 +1,36 @@ +From 19d76588037977f59506c18aa3d307f8f5124d0f Mon Sep 17 00:00:00 2001 +From: Axel Gneiting +Date: Sat, 29 Apr 2023 17:59:07 -0700 +Subject: [PATCH] Fix warnings with GCC 13 + +Those were not actual bugs +--- + Quake/gl_heap.c | 2 +- + Quake/sv_phys.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Quake/gl_heap.c b/Quake/gl_heap.c +index d2a0ccfa2..db55ad0b0 100644 +--- a/Quake/gl_heap.c ++++ b/Quake/gl_heap.c +@@ -645,7 +645,7 @@ glheapallocation_t *GL_HeapAllocate (glheap_t *heap, VkDeviceSize size, VkDevice + + if (size < heap->segment_size) + { +- allocinfo_t alloc_info; ++ ZEROED_STRUCT (allocinfo_t, alloc_info); + const VkDeviceSize size_alignment_max = q_max (size, alignment); + alloc_info.is_small_alloc = size_alignment_max <= heap->page_size / 2; + if (alloc_info.is_small_alloc) +diff --git a/Quake/sv_phys.c b/Quake/sv_phys.c +index 3f57f53e2..f214aea22 100644 +--- a/Quake/sv_phys.c ++++ b/Quake/sv_phys.c +@@ -276,6 +276,7 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) + blocked = 0; + VectorCopy (ent->v.velocity, original_velocity); + VectorCopy (ent->v.velocity, primal_velocity); ++ VectorCopy (ent->v.velocity, new_velocity); + numplanes = 0; + + time_left = time; diff --git a/vkquake.changes b/vkquake.changes index 9af98bd..6950096 100644 --- a/vkquake.changes +++ b/vkquake.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 5 15:53:59 UTC 2023 - Jaime Marquínez Ferrándiz + +- Add fix_maybe-uninitialized_error.patch + ------------------------------------------------------------------- Sat Mar 18 19:13:47 UTC 2023 - Martin Hauke diff --git a/vkquake.spec b/vkquake.spec index 56410a4..b4daca3 100644 --- a/vkquake.spec +++ b/vkquake.spec @@ -28,6 +28,8 @@ Source: https://github.com/Novum/vkQuake/archive/refs/tags/%{version}.ta Source99: %{name}.changes Source100: appdata.xml Source101: %{name}.desktop +# PATCH-FIX-UPSTREAM https://github.com/Novum/vkQuake/issues/688 +Patch1: fix_maybe-uninitialized_error.patch BuildRequires: glslang-devel BuildRequires: pkgconfig BuildRequires: vulkan-devel >= 1.2.162 @@ -43,7 +45,7 @@ vkQuake is a Quake 1 port using Vulkan instead of OpenGL for rendering. It is ba Game data must be placed in ~/.vkquake/id1 . %prep -%autosetup -n vkQuake-%{version} +%autosetup -n vkQuake-%{version} -p1 %if 0%{?sle_version} < 150200 sed -i 's#vulkan_core.h#vulkan.h#' Quake/quakedef.h