Fixed host build issues/warnings

This commit is contained in:
Ingo Weinhold 2011-06-16 20:30:06 +02:00
parent a7bcad8194
commit 14c34be2e1
4 changed files with 8 additions and 2 deletions

View File

@ -15,6 +15,7 @@
#include <driver_settings.h>
#include <File.h>
#include <Message.h>
#include <package/PackageInfo.h>

View File

@ -90,7 +90,7 @@ BBufferDataReader::ReadData(off_t offset, void* buffer, size_t size)
if (offset < 0)
return B_BAD_VALUE;
if (size > fSize || offset > fSize - size)
if (size > fSize || offset > (off_t)fSize - (off_t)size)
return B_ERROR;
memcpy(buffer, (const uint8*)fData + offset, size);

View File

@ -671,7 +671,11 @@ PackageWriterImpl::_AddEntry(int dirFD, Entry* entry, const char* fileName,
}
_AddAttribute(B_HPKG_ATTRIBUTE_ID_FILE_ATIME, uint32(st.st_atime));
_AddAttribute(B_HPKG_ATTRIBUTE_ID_FILE_MTIME, uint32(st.st_mtime));
#ifdef __HAIKU__
_AddAttribute(B_HPKG_ATTRIBUTE_ID_FILE_CRTIME, uint32(st.st_crtime));
#else
_AddAttribute(B_HPKG_ATTRIBUTE_ID_FILE_CRTIME, uint32(st.st_mtime));
#endif
// TODO: File user/group!
// add file data/symlink path

View File

@ -964,7 +964,8 @@ ReaderImplBase::ReadCompressedBuffer(const SectionInfo& section)
while (compressedSize > 0) {
// read compressed buffer
size_t toRead = std::min(compressedSize, fScratchBufferSize);
size_t toRead = std::min((size_t)compressedSize,
fScratchBufferSize);
error = ReadBuffer(offset, fScratchBuffer, toRead);
if (error != B_OK)
return error;