Permalink
Browse files

Fixed casting warnings and problems

  • Loading branch information...
1 parent 3d9320c commit 2146a133dd0fc8d1652df551b41ccaf65e8db19b @kthakore kthakore committed Oct 17, 2011
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/SDL.xs
View
@@ -118,10 +118,10 @@ windows_force_driver()
{
char *test;
#if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 9
- *test = (char *)SDL_getenv("SDL_VIDEODRIVER");
+ test = SDL_getenv("SDL_VIDEODRIVER");
#else
- *test = getenv("SDL_VIDEODRIVER");
-#endif
+ test = getenv("SDL_VIDEODRIVER");
+#endif
if(!test || 0 != strcmp("dummy", test))
{
#if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 14
@@ -273,10 +273,9 @@ getenv (name)
char *test;
/* SDL version 1.2.9 doesn't have SDL_getenv */
#if SDL_MAJOR_VERSION >= 1 && SDL_MINOR_VERSION >= 2 && SDL_PATCHLEVEL >= 9
- *test = (char *)SDL_getenv(name);
- warn("Ran SDL_getenv");
+ test = SDL_getenv(name);
#else
- *test = getenv(name);
+ test = getenv(name);
#endif
RETVAL = test;
OUTPUT:

0 comments on commit 2146a13

Please sign in to comment.