]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/vfswad/vfs.cpp
Fixing Linux SCons build.
[xonotic/netradiant.git] / plugins / vfswad / vfs.cpp
index 251fc704a4ab79288212db1482e68cb3c4e44dfe..5aca73a0d377dc1ec49f366c1ce374e9858068c3 100644 (file)
@@ -380,7 +380,7 @@ void vfsInitDirectory (const char *path)
         if(name == NULL)
           break;
 
-        char *ext = strrchr (name, '.');
+        const char *ext = strrchr (name, '.');
         if ((ext == NULL) || (strcmp (ext, ".wad") != 0))
           continue;
 
@@ -398,8 +398,6 @@ void vfsInitDirectory (const char *path)
 //   (for instance when modifying the project settings)
 void vfsShutdown ()
 {
-  wadFile_t *tmpptr;
-
   while (g_wadFiles)
   {
     wadCleanup((wadFile_t *)g_wadFiles->data);
@@ -710,7 +708,7 @@ char* vfsGetFullPath(const char *in, int index, int flag)
       char *ptr,*lastptr;
       lastptr = file->name;
 
-      while (ptr = strchr(lastptr,'/'))
+      while ((ptr = strchr(lastptr,'/')) != NULL)
         lastptr = ptr+1;
 
       if (strcmp (lastptr, fixed) == 0)
@@ -750,9 +748,9 @@ char* vfsGetFullPath(const char *in, int index, int flag)
 const char* vfsBasePromptPath()
 {
 #ifdef _WIN32
-  static char* path = "C:";
+  static const char* path = "C:";
 #else
-  static char* path = "/";
+  static const char* path = "/";
 #endif
   return path;
 }