1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
Author: Guillem Jover <guillem@hadrons.org>
Description: Fix FTBFS with gcc-14 new default -Wincompatible-pointer-types
Bug-Debian: #1075011
Origin: vendor
Forwarded: no
---
glide3x/h5/glide3/src/fifo.c | 2 +-
glide3x/h5/glide3/src/fxcmd.h | 2 +-
glide3x/h5/glide3/src/glfb.c | 7 ++++---
glide3x/h5/minihwc/linhwc.c | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
--- a/glide3x/h5/glide3/src/fxcmd.h
+++ b/glide3x/h5/glide3/src/fxcmd.h
@@ -190,7 +190,7 @@ _grGet32(volatile FxU32* const sstAddr);
#ifdef __linux__
void _grImportFifo(AnyPtr fifoPtr, AnyPtr fifoRead);
-void _grExportFifo(FxU32 *fifoPtr, FxU32 *fifoRead);
+void _grExportFifo(volatile FxU32 *fifoPtr, volatile FxU32 *fifoRead);
void _grInvalidateAll(void);
#endif
--- a/glide3x/h5/minihwc/linhwc.c
+++ b/glide3x/h5/minihwc/linhwc.c
@@ -991,6 +991,6 @@ void grDRIInvalidateAll() {
void grDRIResetSAREA()
{
- _grExportFifo(driInfo.fifoPtr, driInfo.fifoRead);
+ _grExportFifo((volatile FxU32 *)driInfo.fifoPtr, (volatile FxU32 *)driInfo.fifoRead);
}
--- a/glide3x/h5/glide3/src/glfb.c
+++ b/glide3x/h5/glide3/src/glfb.c
@@ -1335,7 +1335,8 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf
/* adjust starting alignment */
if (((AnyPtr)src)&3) {
*((FxU16 *)dst)=*((FxU16 *)src);
- dst = ((FxU16 *)dst)+1; src = ((FxU16 *)src);
+ dst = (FxU32 *)(((FxU16 *)dst) + 1);
+ src = (FxU32 *)((FxU16 *)src);
}
/* read in dwords of pixels */
@@ -1355,8 +1356,8 @@ GR_ENTRY(grLfbReadRegion, FxBool, (GrBuf
*((FxU16 *)(((AnyPtr)dst) + byte_index))=*((FxU16 *)(((AnyPtr)src) + byte_index));
}
/* adjust for next line */
- src=((FxU8 *)src)+src_adjust;
- dst=((FxU8 *)dst)+dst_adjust;
+ src = (FxU32 *)(((FxU8 *)src) + src_adjust);
+ dst = (FxU32 *)(((FxU8 *)dst) + dst_adjust);
}
rv=FXTRUE;
/* unlock buffer */
--- a/glide3x/h5/glide3/src/fifo.c
+++ b/glide3x/h5/glide3/src/fifo.c
@@ -1422,7 +1422,7 @@ _grImportFifo(AnyPtr fifoPtr, AnyPtr fif
}
void
-_grExportFifo(FxU32 *fifoPtr, FxU32 *fifoRead) {
+_grExportFifo(volatile FxU32 *fifoPtr, volatile FxU32 *fifoRead) {
struct cmdTransportInfo* gcFifo;
GR_DCL_GC;
gcFifo=&gc->cmdTransportInfo;
--- a/glide3x/h5/glide3/src/fxglide.h
+++ b/glide3x/h5/glide3/src/fxglide.h
@@ -1275,6 +1275,11 @@ typedef struct {
*/
#define GR_MEMTYPE GR_GET_RESERVED_1
+#if !defined(__linux__) || defined(GLIDE_USE_C_TRISETUP)
+#define TRISETUPARGS const void *a, const void *b, const void *c
+#else
+#define TRISETUPARGS const void *g, const void *a, const void *b, const void *c
+#endif
/* gpci.c
*
@@ -1282,11 +1287,7 @@ typedef struct {
* the _archXXXX proc list that is selected at grGlideInit time.
*/
-#if !defined(__linux__) || defined(GLIDE_USE_C_TRISETUP)
-typedef FxI32 (FX_CALL* GrTriSetupProc)(const void *a, const void *b, const void *c);
-#else /* defined(__linux__) */
-typedef FxI32 (FX_CALL* GrTriSetupProc)(const void *g, const void *a, const void *b, const void *c);
-#endif /* defined(__linux__) */
+typedef FxI32 (FX_CALL* GrTriSetupProc)(TRISETUPARGS);
typedef void (FX_CALL* GrVertexListProc)(FxU32 pkType, FxU32 type, FxI32 mode, FxI32 count, void* ptrs);
typedef void (FX_CALL* GrDrawTrianglesProc)(FxI32 mode, FxI32 count, void* vPtrs);
@@ -1304,19 +1305,19 @@ typedef GrTriSetupProcVector GrTriSetupP
* gc is nabbed from tls and passed in edx. Screw w/ this at your
* own peril. You have been warned.
*/
-extern FxI32 FX_CALL _trisetup_Default_win_cull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_Default_win_cull_valid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_Default_win_nocull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_Default_win_nocull_valid(const void*, const void*, const void*);
+extern FxI32 FX_CALL _trisetup_Default_win_cull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_Default_win_cull_valid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_Default_win_nocull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_Default_win_nocull_valid(TRISETUPARGS);
/* Only one specialziation exists so far */
-extern FxI32 FX_CALL _vptrisetup_cull(const void*, const void*, const void*);
+extern FxI32 FX_CALL _vptrisetup_cull(TRISETUPARGS);
/* Routine to call into the architecture specialized version of
* _grDrawTriangles if there is no specialized version of the
* grDrawTriangle routine for clip coordinates.
*/
-extern FxI32 FX_CALL _trisetup_clip_coor_thunk(const void*, const void*, const void*);
+extern FxI32 FX_CALL _trisetup_clip_coor_thunk(TRISETUPARGS);
extern void FX_CALL _grDrawTriangles_Default(FxI32, FxI32, void*);
@@ -1324,15 +1325,15 @@ void FX_CSTYLE _drawvertexlist(FxU32 pkt
void FX_CSTYLE _vpdrawvertexlist(FxU32 pktype, FxU32 type, FxI32 mode, FxI32 count, void *pointers);
#if GL_AMD3D
-extern FxI32 FX_CALL _trisetup_3DNow_win_cull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_win_cull_valid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_win_nocull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_win_nocull_valid(const void*, const void*, const void*);
-
-extern FxI32 FX_CALL _trisetup_3DNow_clip_cull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_clip_cull_valid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_clip_nocull_invalid(const void*, const void*, const void*);
-extern FxI32 FX_CALL _trisetup_3DNow_clip_nocull_valid(const void*, const void*, const void*);
+extern FxI32 FX_CALL _trisetup_3DNow_win_cull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_win_cull_valid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_win_nocull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_win_nocull_valid(TRISETUPARGS);
+
+extern FxI32 FX_CALL _trisetup_3DNow_clip_cull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_clip_cull_valid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_clip_nocull_invalid(TRISETUPARGS);
+extern FxI32 FX_CALL _trisetup_3DNow_clip_nocull_valid(TRISETUPARGS);
extern void FX_CALL _grDrawTriangles_3DNow(FxI32, FxI32, void*);
void FX_CSTYLE _grDrawVertexList_3DNow_Window(FxU32 pktype, FxU32 type, FxI32 mode, FxI32 count, void *pointers);
@@ -1756,11 +1757,7 @@ typedef struct GrGC_s
occur every 64K writes. */
} cmdTransportInfo;
-#if !defined(__linux__) || defined(GLIDE_USE_C_TRISETUP)
- FxI32 (FX_CALL *triSetupProc)(const void *a, const void *b, const void *c);
-#else /* defined(__linux__) */
- FxI32 (FX_CALL *triSetupProc)(const void *g, const void *a, const void *b, const void *c);
-#endif /* defined(__linux__) */
+ FxI32 (FX_CALL *triSetupProc)(TRISETUPARGS);
SstIORegs
*ioRegs; /* I/O remap regs */
|