Skip to content
This repository
Browse code

Fixed casting warnings and problems

  • Loading branch information...
commit 2146a133dd0fc8d1652df551b41ccaf65e8db19b 1 parent 3d9320c
Kartik Thakore kthakore authored

Showing 1 changed file with 5 additions and 6 deletions. Show diff stats Hide diff stats

  1. +5 6 src/SDL.xs
11 src/SDL.xs
@@ -118,10 +118,10 @@ windows_force_driver()
118 118 {
119 119 char *test;
120 120 #if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 9
121   - *test = (char *)SDL_getenv("SDL_VIDEODRIVER");
  121 + test = SDL_getenv("SDL_VIDEODRIVER");
122 122 #else
123   - *test = getenv("SDL_VIDEODRIVER");
124   -#endif
  123 + test = getenv("SDL_VIDEODRIVER");
  124 +#endif
125 125 if(!test || 0 != strcmp("dummy", test))
126 126 {
127 127 #if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 14
@@ -273,10 +273,9 @@ getenv (name)
273 273 char *test;
274 274 /* SDL version 1.2.9 doesn't have SDL_getenv */
275 275 #if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 9
276   - *test = (char *)SDL_getenv(name);
277   - warn("Ran SDL_getenv");
  276 + test = SDL_getenv(name);
278 277 #else
279   - *test = getenv(name);
  278 + test = getenv(name);
280 279 #endif
281 280 RETVAL = test;
282 281 OUTPUT:

0 comments on commit 2146a13

Please sign in to comment.
Something went wrong with that request. Please try again.