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 - [patch] warnings in SDL_event.c
Summary: [patch] warnings in SDL_event.c
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 21:07 UTC by Malte Kießling
Modified: 2020-03-02 23:08 UTC (History)
0 users

See Also:


Attachments
patch (2.26 KB, patch)
2020-02-25 21:07 UTC, Malte Kießling
Details | Diff

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