Fixed filesystem test program to compile with older versions of C.
authorPhilipp Wiesemann
Tue, 01 Dec 2015 22:21:29 +0100
changeset 9937526e4079b1df
parent 9936 69a5f3a540af
child 9938 c1bdce8e9c64
Fixed filesystem test program to compile with older versions of C.
test/testfilesystem.c
     1.1 --- a/test/testfilesystem.c	Mon Nov 30 23:30:01 2015 -0500
     1.2 +++ b/test/testfilesystem.c	Tue Dec 01 22:21:29 2015 +0100
     1.3 @@ -17,6 +17,9 @@
     1.4  int
     1.5  main(int argc, char *argv[])
     1.6  {
     1.7 +    char *base_path;
     1.8 +    char *pref_path;
     1.9 +
    1.10      /* Enable standard application logging */
    1.11      SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    1.12  
    1.13 @@ -25,7 +28,7 @@
    1.14          return 1;
    1.15      }
    1.16  
    1.17 -    char *base_path = SDL_GetBasePath();
    1.18 +    base_path = SDL_GetBasePath();
    1.19      if(base_path == NULL){
    1.20        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n",
    1.21                     SDL_GetError());
    1.22 @@ -35,7 +38,7 @@
    1.23      SDL_Log("base path: '%s'\n", base_path);
    1.24      SDL_free(base_path);
    1.25  
    1.26 -    char *pref_path = SDL_GetPrefPath("libsdl", "testfilesystem");
    1.27 +    pref_path = SDL_GetPrefPath("libsdl", "testfilesystem");
    1.28      if(pref_path == NULL){
    1.29        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n",
    1.30                     SDL_GetError());