File fix_maybe-uninitialized_error.patch of Package vkquake

From 19d76588037977f59506c18aa3d307f8f5124d0f Mon Sep 17 00:00:00 2001
From: Axel Gneiting <axelgneiting@gmail.com>
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;
openSUSE Build Service is sponsored by