aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-02-14 04:58:06 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-02-14 04:58:06 +0000
commit802bc74a375fa5ce814626d572af7467fc914bc8 (patch)
treecd835e5a4242c4e5072cdb9043ef7e3316b0aa3c
parent2e959b2f9baa616af0b7f9343281650e2960a2fc (diff)
downloadports-802bc74a375fa5ce814626d572af7467fc914bc8.tar.gz
ports-802bc74a375fa5ce814626d572af7467fc914bc8.zip
games/quake2max: specify return type of Mod_GetTris() function correctly
It iterates over a counter (local variable) and returns its value, not the address. While here, staticize it as it is not called elsewhere. Reported by: pkg-fallout (clang 15)
-rw-r--r--games/quake2max/files/patch-ref_gl__gl_model.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/games/quake2max/files/patch-ref_gl__gl_model.c b/games/quake2max/files/patch-ref_gl__gl_model.c
index e5c270853f20..9d2fd4530009 100644
--- a/games/quake2max/files/patch-ref_gl__gl_model.c
+++ b/games/quake2max/files/patch-ref_gl__gl_model.c
@@ -27,3 +27,12 @@
if (mod->script[i])
RS_ReadyScript((rscript_t *)mod->script[i]);
}
+@@ -1465,7 +1465,7 @@
+ }
+
+
+-signed int *Mod_GetTris(short p1, short p2, dtriangle_t *side1, dmdl_t *hdr)
++static signed int Mod_GetTris(short p1, short p2, dtriangle_t *side1, dmdl_t *hdr)
+ {
+ dtriangle_t *tris = (dtriangle_t *)((unsigned char*)hdr + hdr->ofs_tris);
+ int i;