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 4366 - Compile throws a warning on RPI (Raspbian Stretch)
Summary: Compile throws a warning on RPI (Raspbian Stretch)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.9
Hardware: ARM Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-07 18:04 UTC by midwan
Modified: 2018-11-13 00:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description midwan 2018-11-07 18:04:32 UTC
This occurs in both 2.0.9 and the current tip from Mercurial:

When trying to compile on a Raspberry Pi 3, running Raspbian Stretch (fully updated), a warning appears:

/home/pi/projects/SDL/src/test/SDL_test_memory.c: In function ‘SDL_TrackAllocation’:
/home/pi/projects/SDL/src/test/SDL_test_memory.c:112:109: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘unw_word_t {aka unsigned int}’ [-Wformat=]
                 snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset);
Comment 1 Christer Solskogen 2018-11-08 10:17:16 UTC
This only happens if HAVE_LIBUNWIND_H is defined (and alas: if the user have /usr/include/libunwind.h)
Comment 2 Sam Lantinga 2018-11-13 00:43:30 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/2a761b9ff83f

We need the larger size in the print statement to cover 64-bit architectures.