mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 00:51:21 +01:00
require unsigned arguments for Array(s)Of::reinit
This commit is contained in:
@@ -159,7 +159,7 @@ LegacyBlockFile::~LegacyBlockFile()
|
||||
bool LegacyBlockFile::ReadSummary(void *data)
|
||||
{
|
||||
wxFFile summaryFile(mFileName.GetFullPath(), wxT("rb"));
|
||||
int read;
|
||||
size_t read;
|
||||
{
|
||||
Maybe<wxLogNull> silence{};
|
||||
if (mSilentLog)
|
||||
@@ -167,14 +167,14 @@ bool LegacyBlockFile::ReadSummary(void *data)
|
||||
|
||||
if (!summaryFile.IsOpened()){
|
||||
|
||||
memset(data, 0, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memset(data, 0, mSummaryInfo.totalSummaryBytes);
|
||||
|
||||
mSilentLog = TRUE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
read = summaryFile.Read(data, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
read = summaryFile.Read(data, mSummaryInfo.totalSummaryBytes);
|
||||
}
|
||||
mSilentLog=FALSE;
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ bool ODDecodeBlockFile::ReadSummary(void *data)
|
||||
if(IsSummaryAvailable())
|
||||
return SimpleBlockFile::ReadSummary(data);
|
||||
|
||||
memset(data, 0, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memset(data, 0, mSummaryInfo.totalSummaryBytes);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ bool ODPCMAliasBlockFile::ReadSummary(void *data)
|
||||
if( !summaryFile.IsOpened() ){
|
||||
|
||||
// NEW model; we need to return valid data
|
||||
memset(data,0,(size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memset(data, 0, mSummaryInfo.totalSummaryBytes);
|
||||
|
||||
// we silence the logging for this operation in this object
|
||||
// after first occurrence of error; it's already reported and
|
||||
@@ -529,9 +529,11 @@ bool ODPCMAliasBlockFile::ReadSummary(void *data)
|
||||
mFileNameMutex.Unlock();
|
||||
return true;
|
||||
|
||||
}else mSilentLog=FALSE; // worked properly, any future error is NEW
|
||||
}
|
||||
else
|
||||
mSilentLog=FALSE; // worked properly, any future error is NEW
|
||||
|
||||
int read = summaryFile.Read(data, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
auto read = summaryFile.Read(data, mSummaryInfo.totalSummaryBytes);
|
||||
|
||||
FixSummary(data);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ SilentBlockFile::~SilentBlockFile()
|
||||
|
||||
bool SilentBlockFile::ReadSummary(void *data)
|
||||
{
|
||||
memset(data, 0, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memset(data, 0, mSummaryInfo.totalSummaryBytes);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ SimpleBlockFile::SimpleBlockFile(wxFileNameWrapper &&baseFileName,
|
||||
format, cleanup);
|
||||
mCache.summaryData = new char[mSummaryInfo.totalSummaryBytes];
|
||||
memcpy(mCache.summaryData, summaryData,
|
||||
(size_t)mSummaryInfo.totalSummaryBytes);
|
||||
mSummaryInfo.totalSummaryBytes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,9 +346,10 @@ bool SimpleBlockFile::ReadSummary(void *data)
|
||||
if (mCache.active)
|
||||
{
|
||||
//wxLogDebug("SimpleBlockFile::ReadSummary(): Summary is already in cache.");
|
||||
memcpy(data, mCache.summaryData, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memcpy(data, mCache.summaryData, mSummaryInfo.totalSummaryBytes);
|
||||
return true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
//wxLogDebug("SimpleBlockFile::ReadSummary(): Reading summary from disk.");
|
||||
|
||||
@@ -361,7 +362,7 @@ bool SimpleBlockFile::ReadSummary(void *data)
|
||||
// FIXME: TRAP_ERR no report to user of absent summary files?
|
||||
// filled with zero instead.
|
||||
if (!file.IsOpened()){
|
||||
memset(data, 0, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
memset(data, 0, mSummaryInfo.totalSummaryBytes);
|
||||
mSilentLog = TRUE;
|
||||
return true;
|
||||
}
|
||||
@@ -373,7 +374,7 @@ bool SimpleBlockFile::ReadSummary(void *data)
|
||||
if( !file.Seek(sizeof(auHeader)) )
|
||||
return false;
|
||||
|
||||
int read = (int)file.Read(data, (size_t)mSummaryInfo.totalSummaryBytes);
|
||||
auto read = file.Read(data, mSummaryInfo.totalSummaryBytes);
|
||||
|
||||
FixSummary(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user