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 2702

Summary: Non-literal format string
Product: SDL Reporter: John McFarlane <john>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.3   
Hardware: ARM   
OS: Android (All)   

Description John McFarlane 2014-08-23 22:24:39 UTC
When building SDL2 for Android I get this single compiler error:

[armeabi-v7a] Compile thumb  : SDL2 <= SDL_test_assert.c
jni/SDL/src/test/SDL_test_assert.c: In function 'SDLTest_Assert':
jni/SDL/src/test/SDL_test_assert.c:59:5: error: format not a string literal and no format arguments [-Werror=format-security]
     SDL_assert((SDLTest_AssertCheck(assertCondition, logMessage)));
     ^

The simplest fix is to change the above line as follows:

    SDL_assert((SDLTest_AssertCheck(assertCondition, "%s", logMessage)));
Comment 1 Sam Lantinga 2014-08-24 07:06:05 UTC
This is fixed in Mercurial, thanks!