File gcc-11.patch of Package darkplaces
From 5e9e998c1759bc0085c3273fc39f9ea6f72a7dc8 Mon Sep 17 00:00:00 2001
From: Cloudwalk <cloudwalk@icculus.org>
Date: Thu, 21 Oct 2021 13:02:34 -0400
Subject: [PATCH] dpsoftrast: Fix GCC 11 build
Patch from https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc2ba1cd6fdc5a7ad7d161efb21652b73c6b207e
---
dpsoftrast.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dpsoftrast.c b/dpsoftrast.c
index d9c727204..fff29b8c5 100644
--- a/dpsoftrast.c
+++ b/dpsoftrast.c
@@ -177,7 +177,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Triangle_s
float w[3];
ALIGN(float attribs[DPSOFTRAST_ARRAY_TOTAL][3][4]);
}
-DPSOFTRAST_State_Triangle);
+) DPSOFTRAST_State_Triangle;
#define DPSOFTRAST_CALCATTRIB(triangle, span, data, slope, arrayindex) { \
slope = _mm_load_ps((triangle)->attribs[arrayindex][0]); \
@@ -209,7 +209,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Span_s
int depthbase; // depthbuffer value at x (add depthslope*startx to get first pixel's depthbuffer value)
int depthslope; // depthbuffer value pixel delta
}
-DPSOFTRAST_State_Span);
+) DPSOFTRAST_State_Span;
#define DPSOFTRAST_DRAW_MAXSPANS 1024
#define DPSOFTRAST_DRAW_MAXTRIANGLES 128
@@ -299,8 +299,8 @@ typedef ALIGN(struct DPSOFTRAST_State_Thread_s
DPSOFTRAST_State_Span spans[DPSOFTRAST_DRAW_MAXSPANS];
DPSOFTRAST_State_Triangle triangles[DPSOFTRAST_DRAW_MAXTRIANGLES];
unsigned char pixelmaskarray[DPSOFTRAST_DRAW_MAXSPANLENGTH+4]; // LordHavoc: padded to allow some termination bytes
-}
-DPSOFTRAST_State_Thread);
+})
+DPSOFTRAST_State_Thread;
typedef ALIGN(struct DPSOFTRAST_State_s
{
@@ -358,7 +358,7 @@ typedef ALIGN(struct DPSOFTRAST_State_s
DPSOFTRAST_State_Command_Pool commandpool;
}
-DPSOFTRAST_State);
+) DPSOFTRAST_State;
DPSOFTRAST_State dpsoftrast;
--
GitLab