Fixed filesystem test program to compile with older versions of C.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 01 Dec 2015 22:21:29 +0100
changeset 9937 526e4079b1df
parent 9936 69a5f3a540af
child 9938 c1bdce8e9c64
Fixed filesystem test program to compile with older versions of C.
test/testfilesystem.c
--- a/test/testfilesystem.c	Mon Nov 30 23:30:01 2015 -0500
+++ b/test/testfilesystem.c	Tue Dec 01 22:21:29 2015 +0100
@@ -17,6 +17,9 @@
 int
 main(int argc, char *argv[])
 {
+    char *base_path;
+    char *pref_path;
+
     /* Enable standard application logging */
     SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
 
@@ -25,7 +28,7 @@
         return 1;
     }
 
-    char *base_path = SDL_GetBasePath();
+    base_path = SDL_GetBasePath();
     if(base_path == NULL){
       SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n",
                    SDL_GetError());
@@ -35,7 +38,7 @@
     SDL_Log("base path: '%s'\n", base_path);
     SDL_free(base_path);
 
-    char *pref_path = SDL_GetPrefPath("libsdl", "testfilesystem");
+    pref_path = SDL_GetPrefPath("libsdl", "testfilesystem");
     if(pref_path == NULL){
       SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n",
                    SDL_GetError());