]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix compile warnings from gcc and g++
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:38:18 +0000 (14:38 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 14:38:18 +0000 (14:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12845 d7cf8633-e32d-0410-b094-e92efae38249

console.c
fs.c
model_shared.h

index 1a4b19148005e0ee16131a601241969d07db6f79..37d342b0667e071eaca35e8f672c7a3dc1982aec 100644 (file)
--- 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 5a06538a108d3eca4df1d0f79c13405370dc93fd..3bedf6b042721c0c07c59838981e5c1c97901b97 100644 (file)
--- 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);
index 38469a560dea575a83d3700d43d6817f36639239..5c38de4d3f0c789fbdd03f5dcd71f76bf58367d3 100644 (file)
@@ -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;