Commit ee85a41a32076f03c1d5101e4eb35df2becf4a37

Sam Lantinga 2020-12-13T02:10:46

Fixed compile warning

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m
index 3d03e3c..f278c28 100644
--- a/src/video/cocoa/SDL_cocoashape.m
+++ b/src/video/cocoa/SDL_cocoashape.m
@@ -35,14 +35,14 @@ Cocoa_CreateShaper(SDL_Window* window)
 
     [windata->nswindow setStyleMask:NSWindowStyleMaskBorderless];
 
-    SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
+    SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper));
     result->window = window;
     result->mode.mode = ShapeModeDefault;
     result->mode.parameters.binarizationCutoff = 1;
     result->userx = result->usery = 0;
     window->shaper = result;
 
-    SDL_ShapeData* data = malloc(sizeof(SDL_ShapeData));
+    SDL_ShapeData* data = (SDL_ShapeData *)SDL_malloc(sizeof(SDL_ShapeData));
     result->driverdata = data;
     data->context = [windata->nswindow graphicsContext];
     data->saved = SDL_FALSE;