Bug#749659: audacity + wxWidgets 3.0 — Proposing patch

Olly Betts olly at survex.com
Sat Aug 30 16:58:58 UTC 2014


Control: tags -1 + patch

On Wed, Aug 20, 2014 at 11:17:42PM +0200, Martin Steghöfer wrote:
> Last weekend I was able to work on this bug. I managed to compile and run
> audacity with wxWidgets 3.0 successfully. However, there are still a few
> issues to resolve (mainly by wxWidgets upstream).

Sounds great - sorry for not responding sooner, but I only just noticed
your message.  Be aware that the Debian BTS doesn't send replies to the
submitter of the bug by default (IMO, a complete misfeature).

> As the patch has gotten way larger than I had expected, I feel the need to
> explain the changes:

A lot of these changes are things I've seen needed in other packages.

Generally the patch looks good to me (I'm not familiar with the audacity
code, but I am quite familiar with porting code to wx3).

> --- a/src/widgets/FileHistory.cpp
> +++ b/src/widgets/FileHistory.cpp
> @@ -142,7 +142,7 @@
>     // Stored in reverse order
>     int n = mHistory.GetCount() - 1;
>     for (size_t i = 1; i <= mHistory.GetCount(); i++) {
> -      config.Write(wxString::Format(wxT("file%02d"), i), mHistory[n--]);
> +      config.Write(wxString::Format(wxT("file%02lld"), i), mHistory[n--]);

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).  The
same assumption is made elsewhere in the patch.

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--]);

Maintainers - let me know if you'd like me to NMU with these patches.

Cheers,
    Olly



More information about the pkg-multimedia-maintainers mailing list