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 2908

Summary: Fix clang warnings
Product: SDL Reporter: Simon Deschenes <moi>
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2 CC: philipp.wiesemann
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: The patch

Description Simon Deschenes 2015-03-14 20:48:16 UTC
Created attachment 2063 [details]
The patch

My build system still shows warning as errors.

This patch fixes the warnings clang outputs.

The first warning says that the member named instances can never be false (or NULL) as it is a static array, and we should check for instances[index] which we do anyway.

The second and third warning says the that the type specifier for printing is ld but the type is long long. Putting the platform agnostic SInt64 fixes the problem as it chooses the correct type depending on the platform, either long or long long.
Comment 1 Sam Lantinga 2015-06-15 02:22:11 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/306e09b65660