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 3636

Summary: Compiles with warnings at SDL_test_common.c(64-bit) and SDL_render_gles2.c(32-bit) on Android NDK
Product: SDL Reporter: superfury
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.5   
Hardware: Other   
OS: Windows 10   

Description superfury 2017-04-22 11:18:26 UTC
When trying to compile SDL2 2.0.5 on Android-ndk, I get the following warnings on SDL_test_common.c 64-bit compilations:

--- Begin of error copy
jni/SDL2/src/test/SDL_test_common.c: In function 'SDLTest_PrintEvent':
jni/SDL2/src/test/SDL_test_common.c:1213:9: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'SDL_GestureID' [-Wformat=]
         SDL_Log("SDL_EVENT: Dollar gesture detect: %"SDL_PRIs64, (Sint64) event->dgesture.gestureId);
         ^
jni/SDL2/src/test/SDL_test_common.c:1216:9: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'SDL_GestureID' [-Wformat=]
         SDL_Log("SDL_EVENT: Dollar gesture record: %"SDL_PRIs64, (Sint64) event->dgesture.gestureId);
--- End of error copy
(The Begin and End of the copied text from the Windows 10 command prompt are marked on their own lines)

Also, some other warning occurs on 32-bit compilations:
--- Begin of error copy
jni/SDL2/src/render/opengles2/SDL_gles2funcs.h: In function 'GLES2_LoadFunctions':
jni/SDL2/src/render/opengles2/SDL_render_gles2.c:294:45: warning: assignment from incompatible pointer type
 #define SDL_PROC(ret,func,params) data->func=func;
                                             ^
jni/SDL2/src/render/opengles2/SDL_gles2funcs.h:56:1: note: in expansion of macro 'SDL_PROC'
 SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *))
--- End of error copy

The SDL2/src directory is a directly unmodified copy of the SDL2-2.0.5\src folder in the zip file provided on the libsdl.org website.
Comment 1 Sam Lantinga 2017-08-11 18:39:55 UTC
Hey Ryan, more joy with the format specifiers...