From 6ed1cad320c009fd551e087e01e636d35a36bb7d Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 18 Oct 2021 19:40:18 +0100 Subject: [PATCH] SDL backend, macOs warning build fixes proposal. --- neo/sys/osx/SDLMain.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/neo/sys/osx/SDLMain.m b/neo/sys/osx/SDLMain.m index 2c148e24..5599789e 100644 --- a/neo/sys/osx/SDLMain.m +++ b/neo/sys/osx/SDLMain.m @@ -5,12 +5,17 @@ Feel free to customize this file to suit your needs */ +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + #include "SDL.h" #include "SDLMain.h" #include /* for MAXPATHLEN */ #include -/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, +/* For some reason, Apple removed setAppleMenu from the headers in 10.4, but the method still is there and works. To avoid warnings, we declare it ourselves here. */ @interface NSApplication(SDL_Missing_Methods) @@ -221,7 +226,7 @@ static void CustomApplicationMain (int argc, char **argv) /* Create SDLMain and make it the app delegate */ sdlMain = [[SDLMain alloc] init]; - [NSApp setDelegate:sdlMain]; + [NSApp setDelegate:(id)sdlMain]; /* Start the main event loop */ [NSApp run]; @@ -378,3 +383,7 @@ int main (int argc, char **argv) #endif return 0; } + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif