Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoavideo.m @ 4457:5e1f9cb9fa98
Fixed compiler warnings
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 May 2010 15:33:10 -0700 |
parents | 2d17445190f6 |
children | 3d91e31fcf71 7a602fd2121f |
comparison
equal
deleted
inserted
replaced
4456:0a5dbe96c3be | 4457:5e1f9cb9fa98 |
---|---|
37 } | 37 } |
38 | 38 |
39 static void | 39 static void |
40 Cocoa_DeleteDevice(SDL_VideoDevice * device) | 40 Cocoa_DeleteDevice(SDL_VideoDevice * device) |
41 { | 41 { |
42 SDL_VideoData *data = (SDL_VideoData *) device->driverdata; | |
43 | |
44 SDL_free(device->driverdata); | 42 SDL_free(device->driverdata); |
45 SDL_free(device); | 43 SDL_free(device); |
46 } | 44 } |
47 | 45 |
48 static SDL_VideoDevice * | 46 static SDL_VideoDevice * |
55 | 53 |
56 /* Initialize all variables that we clean on shutdown */ | 54 /* Initialize all variables that we clean on shutdown */ |
57 device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); | 55 device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); |
58 if (device) { | 56 if (device) { |
59 data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); | 57 data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData)); |
58 } else { | |
59 data = NULL; | |
60 } | 60 } |
61 if (!device || !data) { | 61 if (!data) { |
62 SDL_OutOfMemory(); | 62 SDL_OutOfMemory(); |
63 if (device) { | 63 if (device) { |
64 SDL_free(device); | 64 SDL_free(device); |
65 } | 65 } |
66 return NULL; | 66 return NULL; |
174 [pool release]; | 174 [pool release]; |
175 return (SDL_assert_state) (clicked - NSAlertFirstButtonReturn); | 175 return (SDL_assert_state) (clicked - NSAlertFirstButtonReturn); |
176 } | 176 } |
177 | 177 |
178 /* vim: set ts=4 sw=4 expandtab: */ | 178 /* vim: set ts=4 sw=4 expandtab: */ |
179 |