Fixed host build issues/warnings
This commit is contained in:
parent
dff6f3c1ca
commit
d62ec0bd75
@ -15,6 +15,7 @@
|
||||
|
||||
#include <driver_settings.h>
|
||||
#include <File.h>
|
||||
#include <Message.h>
|
||||
|
||||
#include <package/PackageInfo.h>
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user