From: cloudwalk Date: Mon, 20 Jul 2020 14:38:18 +0000 (+0000) Subject: Fix compile warnings from gcc and g++ X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=abb2f032def60e8262df55ea0c9db356a0329403;p=xonotic%2Fdarkplaces.git Fix compile warnings from gcc and g++ git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12845 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/console.c b/console.c index 1a4b1914..37d342b0 100644 --- a/console.c +++ b/console.c @@ -1530,7 +1530,7 @@ static void Con_DrawInput(qboolean is_console, float x, float v, float inputsize char text[MAX_INPUTLINE + 5 + 9 + 1]; // space for ^xRGB, "say_team:" and \0 float xo; size_t len_out; - char *prefix; + const char *prefix; dp_font_t *fnt; if (is_console && !key_consoleactive) diff --git a/fs.c b/fs.c index 5a06538a..3bedf6b0 100644 --- a/fs.c +++ b/fs.c @@ -3578,7 +3578,8 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet, const int i, basepathlength, numfiles, numchars, resultlistindex, dirlistindex; stringlist_t resultlist; stringlist_t dirlist; - const char *slash, *backslash, *colon, *separator; + stringlist_t matchedSet, foundSet; + const char *start, *slash, *backslash, *colon, *separator; char *basepath; for (i = 0;pattern[i] == '.' || pattern[i] == ':' || pattern[i] == '/' || pattern[i] == '\\';i++) @@ -3655,8 +3656,8 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet, const { if(packfile) continue; - stringlist_t matchedSet, foundSet; - const char *start = pattern; + + start = pattern; stringlistinit(&matchedSet); stringlistinit(&foundSet); diff --git a/model_shared.h b/model_shared.h index 38469a56..5c38de4d 100644 --- a/model_shared.h +++ b/model_shared.h @@ -1074,8 +1074,8 @@ extern unsigned char *mod_base; typedef struct modloader_s { - char *extension; - char *header; + const char *extension; + const char *header; size_t headersize; // The header might not be NULL terminated void (*Load)(dp_model_t *, void *, void *); } modloader_t;