We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3874

Summary: Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m
Product: SDL Reporter: Martin Gerhardy <martin.gerhardy>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2 CC: sezeroz, sylvain.becker
Version: HG 2.0   
Hardware: All   
OS: macOS 10.13   

Description Martin Gerhardy 2017-10-12 06:38:43 UTC
Just a few warnings on osx:

▸ Compiling SDL_cocoakeyboard.m

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/cocoa/SDL_cocoakeyboard.m:96:114: semicolon before method body is ignored [-Wsemicolon-before-method-body]

- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;

                                                      ^

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/cocoa/SDL_cocoakeyboard.m:130:93: semicolon before method body is ignored [-Wsemicolon-before-method-body]

- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;

                                                                                                                 ^

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/cocoa/SDL_cocoakeyboard.m:158:116: semicolon before method body is ignored [-Wsemicolon-before-method-body]


▸ Compiling SDL_surface.c

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/SDL_surface.c:1468:51: unused variable 'y1' [-Wunused-variable]

                            READ_PACKED_YUV(y, u, y1, v); /* y1 unused */

        ^

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/SDL_surface.c:1483:54: unused variable 'y1' [-Wunused-variable]

                            READ_PACKED_YUV(u, y, v, y1); /* y1 unused */

                                                  ^

⚠️  /Users/travis/build/mgerhardy/engine/contrib/libs/sdl2/src/video/SDL_surface.c:1498:51: unused variable 'y1' [-Wunused-variable]

                            READ_PACKED_YUV(y, v, y1, u); /* y1 unused */

                                                     ^
Comment 1 Sylvain 2017-10-12 06:44:23 UTC
the ones from SDL_surface.c should be fixed with: https://hg.libsdl.org/SDL/rev/a68ad1ddb897
Comment 2 Ozkan Sezer 2017-10-12 09:18:16 UTC
Here is another warning from SDL_test_common.c in hg tip:

src/test/SDL_test_common.c: In function 'SDLTest_CommonInit':
src/test/SDL_test_common.c:942:38: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
             if ((state->window_flags & SDL_WINDOW_RESIZABLE|SDL_WINDOW_BORDERLESS) ==
                                      ^

... seems to be introduced by changeset 11539:f74de01f40ec
Comment 3 Sam Lantinga 2017-10-12 15:41:48 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/634c34c79fbc