From f4f9e39f62ac5fb5905f061d8826be1448ec5ff9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 12 Oct 2017 08:41:11 -0700 Subject: [PATCH] Fixed bug 3874 - Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m --- src/test/SDL_test_common.c | 2 +- src/video/cocoa/SDL_cocoakeyboard.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index b536e3808..780993c5b 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -939,7 +939,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) } /* Add resize/drag areas for windows that are borderless and resizable */ - if ((state->window_flags & SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS) == + if ((state->window_flags & (SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS)) == (SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS)) { SDL_SetWindowHitTest(state->windows[i], SDLTest_ExampleHitTestCallback, NULL); } diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m index b2ce5a31d..e1d100a2b 100644 --- a/src/video/cocoa/SDL_cocoakeyboard.m +++ b/src/video/cocoa/SDL_cocoakeyboard.m @@ -93,7 +93,7 @@ return _selectedRange; } -- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange; +- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange { if ([aString isKindOfClass:[NSAttributedString class]]) { aString = [aString string]; @@ -127,7 +127,7 @@ SDL_SendEditingText("", 0, 0); } -- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange; +- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange { NSWindow *window = [self window]; NSRect contentRect = [window contentRectForFrameRect:[window frame]]; @@ -155,7 +155,7 @@ return rect; } -- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange; +- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange { DEBUG_IME(@"attributedSubstringFromRange: (%d, %d)", aRange.location, aRange.length); return nil;