Bug#749659: audacity + wxWidgets 3.0 — Proposing patch

Martin Steghöfer martin at steghoefer.eu
Sat Aug 30 22:05:36 UTC 2014


Hi Olly!


El 30/08/14 a les 18:58, Olly Betts ha escrit:
> The amended code here assumes sizeof(size_t) == sizeof(long long) - that's not
> true on all architectures (both i386 and armel have 4 vs 8, for example).

True that. I should have kept that in mind, I've seen the problem 
several times in other contexts: There is no printf format specifier 
that matches the size of the "size_t" type on all platforms. So casting 
it to something more "C-standard" is the only way to go, like you propose.

> At least in this case, since we're clearly not going to have billions of
> history entries, I'd probably just cast to unsigned:
>
>      config.Write(wxString::Format(wxT("file%02u"), (unsigned)i), mHistory[n--]);

Yep, agreed. If that doesn't work out in other cases (because of 
possible overflows), we can still always cast to "long long" and use the 
"ll" specifier.

Cheers,
Martin



More information about the pkg-multimedia-maintainers mailing list