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 5006

Summary: [patch] warnings in SDL_event.c
Product: SDL Reporter: Malte Kießling <mkalte>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: patch

Description Malte Kießling 2020-02-25 21:07:11 UTC
Created attachment 4229 [details]
patch

In some of the macros and the code inside SDL_LogEvent a few printf parameters are specified with SDL_PRIs64, but the arguments are cast to long long. This causes warnings in both clang and gcc.
(well, only if long long is not the same as int64_t i suppose).  

Changing those casts to Sint64 fixes this. 

Example warning

$HOME/progg/SDL/src/events/SDL_events.c:281:53: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'long long int' [-Wformat=]

~mkalte
Comment 1 Sam Lantinga 2020-03-02 23:08:51 UTC
This is fixed, thanks!
https://hg.libsdl.org/SDL/rev/e5e55d467f7e