Fix remaining compiler warnings.

This commit is contained in:
Glenn Rice
2013-01-31 15:29:29 -06:00
parent 0ffdd2607f
commit f7fa33f2d6
8 changed files with 18 additions and 15 deletions

View File

@ -222,7 +222,7 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
// u64 size = header.block_size;
std::fill(in_buf, in_buf + header.block_size, 0);
if (scrubbing)
DiscScrubber::GetNextBlock(inf.GetHandle(), in_buf);
DiscScrubber::GetNextBlock(inf, in_buf);
else
inf.ReadBytes(in_buf, header.block_size);
z_stream z;

View File

@ -127,7 +127,7 @@ bool SetupScrub(const char* filename, int block_size)
return success;
}
void GetNextBlock(FILE* in, u8* buffer)
void GetNextBlock(File::IOFile& in, u8* buffer)
{
u64 CurrentOffset = m_BlockCount * m_BlockSize;
u64 i = CurrentOffset / CLUSTER_SIZE;
@ -136,12 +136,12 @@ void GetNextBlock(FILE* in, u8* buffer)
{
DEBUG_LOG(DISCIO, "Freeing 0x%016llx", CurrentOffset);
std::fill(buffer, buffer + m_BlockSize, 0xFF);
fseeko(in, m_BlockSize, SEEK_CUR);
in.Seek(m_BlockSize, SEEK_CUR);
}
else
{
DEBUG_LOG(DISCIO, "Used 0x%016llx", CurrentOffset);
fread(buffer, m_BlockSize, 1, in);
in.ReadBytes(buffer, m_BlockSize);
}
m_BlockCount++;

View File

@ -38,7 +38,7 @@ namespace DiscScrubber
{
bool SetupScrub(const char* filename, int block_size);
void GetNextBlock(FILE* in, u8* buffer);
void GetNextBlock(File::IOFile& in, u8* buffer);
void Cleanup();
} // namespace DiscScrubber