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 - Compiles with warnings at SDL_test_common.c(64-bit) and SDL_render_gles2.c(32-bit) on Android NDK
Summary: Compiles with warnings at SDL_test_common.c(64-bit) and SDL_render_gles2.c(32...
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.5
Hardware: Other Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-22 11:18 UTC by superfury
Modified: 2017-08-11 18:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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...