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 2587 - SDL update hg:8820(0e935d5b193a) triggers -Wformat-security warning, breaking Android build
Summary: SDL update hg:8820(0e935d5b193a) triggers -Wformat-security warning, breaking...
Status: RESOLVED FIXED
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Android (All)
: P2 blocker
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-15 11:08 UTC by roaldfernandez
Modified: 2017-06-07 17:07 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roaldfernandez 2014-06-15 11:08:23 UTC
SDL update hg:8820(0e935d5b193a) triggers -Wformat-security warning in the SDL_ttf usage of SDL_SetError. This breaks the android NDK build, as it has a default -Werror=format-security flag set.

The default -Werror=format-security is set by [ANDROID-NDK]/build/core/build-binary.mk

A possible solution is disabling this -Werror flag, by setting LOCAL_DISABLE_FORMAT_STRING_CHECKS=true in a the [SDL_ttf]/Android.mk file.

This affects SDL_image, SDL_ttf.

Duplicate bug report for SDL_image: https://bugzilla.libsdl.org/show_bug.cgi?id=2586

Cheers,
Roald

Change-diff of fix:
diff -r 997babb2f547 Android.mk
--- a/Android.mk	Sun May 11 11:20:09 2014 -0400
+++ b/Android.mk	Sun Jun 15 13:07:43 2014 +0200
@@ -63,4 +63,6 @@
 
 LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
 
+LOCAL_DISABLE_FORMAT_STRING_CHECKS=true
+
 include $(BUILD_SHARED_LIBRARY)
Comment 1 Philipp Wiesemann 2016-01-17 16:35:27 UTC
This might have been fixed here (like in bug 2586):
https://hg.libsdl.org/SDL_ttf/rev/73118378dae8
Comment 2 Ryan C. Gordon 2017-06-07 17:07:10 UTC
Yeah, I think this got fixed a while ago.

--ryan.