mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
From: martin@steghoefer.eu [PATCH 01/15] Fix runtime problem with wxWidgets 3.0: Correct string formatting: wxLongLong -> %lld + long long
The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match. Note: In Shuttle.cpp this patch supersedes one related change done in r13466 because a wxLongLong_t can be bigger than an int and in a generic function like "TransferLongLong" this should be taken into account.
This commit is contained in:
@@ -1843,10 +1843,10 @@ void Sequence::DebugPrintf(wxString *dest)
|
||||
for (i = 0; i < mBlock->GetCount(); i++) {
|
||||
SeqBlock* pSeqBlock = mBlock->Item(i);
|
||||
*dest += wxString::Format
|
||||
(wxT(" Block %3d: start %8d, len %8d, refs %d, "),
|
||||
(wxT(" Block %3u: start %8lld, len %8lld, refs %d, "),
|
||||
i,
|
||||
pSeqBlock->start,
|
||||
pSeqBlock->f ? pSeqBlock->f->GetLength() : 0,
|
||||
(long long) pSeqBlock->start,
|
||||
pSeqBlock->f ? (long long) pSeqBlock->f->GetLength() : 0,
|
||||
pSeqBlock->f ? mDirManager->GetRefCount(pSeqBlock->f) : 0);
|
||||
|
||||
if (pSeqBlock->f)
|
||||
@@ -1864,7 +1864,7 @@ void Sequence::DebugPrintf(wxString *dest)
|
||||
}
|
||||
if (pos != mNumSamples)
|
||||
*dest += wxString::Format
|
||||
(wxT("ERROR mNumSamples = %d\n"), mNumSamples);
|
||||
(wxT("ERROR mNumSamples = %lld\n"), (long long) mNumSamples);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
Reference in New Issue
Block a user