diff --git a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp index 27170f77ba..d7a878434a 100644 --- a/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BPlusTree.cpp @@ -1613,7 +1613,7 @@ BPlusTree::Find(const uint8 *key, uint16 keyLength, off_t *_value) *_value = node->Values()[keyIndex]; #ifdef DEBUG - if (levels != fHeader->max_number_of_levels) + if (levels != (int32)fHeader->max_number_of_levels) DEBUGGER(("levels don't match")); #endif return status; diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index 14667160dd..7f26392816 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -120,7 +120,7 @@ void AllocationBlock::Allocate(uint16 start, uint16 numBlocks) { ASSERT(start < fNumBits); - ASSERT(start + numBlocks <= fNumBits); + ASSERT(uint32(start + numBlocks) <= fNumBits); if (uint32(start + numBlocks) > fNumBits) { FATAL(("Allocation::Allocate(): tried to allocate too many blocks: %u (numBlocks = %lu)!\n", numBlocks, fNumBits)); @@ -151,7 +151,7 @@ void AllocationBlock::Free(uint16 start, uint16 numBlocks) { ASSERT(start < fNumBits); - ASSERT(start + numBlocks <= fNumBits); + ASSERT(uint32(start + numBlocks) <= fNumBits); if (uint32(start + numBlocks) > fNumBits) { FATAL(("Allocation::Free(): tried to free too many blocks: %u (numBlocks = %lu)!\n", numBlocks, fNumBits)); @@ -302,6 +302,7 @@ AllocationGroup::Free(Transaction *transaction, uint16 start, int32 length) start = 0; block++; } + return B_OK; } diff --git a/src/add-ons/kernel/file_systems/bfs/BufferPool.cpp b/src/add-ons/kernel/file_systems/bfs/BufferPool.cpp index 7b13d89af6..d8f2d98216 100644 --- a/src/add-ons/kernel/file_systems/bfs/BufferPool.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BufferPool.cpp @@ -115,6 +115,7 @@ BufferPool::ReleaseBuffers() fFirstFree = buffer; release_sem(fLock); + return B_OK; } diff --git a/src/add-ons/kernel/file_systems/bfs/Debug.h b/src/add-ons/kernel/file_systems/bfs/Debug.h index 71745934d1..b2a5a77239 100644 --- a/src/add-ons/kernel/file_systems/bfs/Debug.h +++ b/src/add-ons/kernel/file_systems/bfs/Debug.h @@ -56,7 +56,8 @@ #ifdef DEBUG #define PRINT(x) { __out("bfs: "); __out x; } - #define REPORT_ERROR(status) __out("bfs: %s:%ld: %s\n",__FUNCTION__,__LINE__,strerror(status)); + #define REPORT_ERROR(status) \ + __out("bfs: %s:%d: %s\n", __FUNCTION__, __LINE__, strerror(status)); #define RETURN_ERROR(err) { status_t _status = err; if (_status < B_OK) REPORT_ERROR(_status); return _status;} #define FATAL(x) { __out("bfs: "); __out x; } #define INFORM(x) { __out("bfs: "); __out x; } diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp b/src/add-ons/kernel/file_systems/bfs/Journal.cpp index 92bd788c40..200171126a 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -49,10 +49,10 @@ Journal::InitCheck() status_t -Journal::CheckLogEntry(int32 count,off_t *array) +Journal::CheckLogEntry(int32 count, off_t *array) { // ToDo: check log entry integrity (block numbers and entry size) - PRINT(("Log entry has %ld entries (%Ld)\n", count)); + PRINT(("Log entry has %ld entries (%Ld)\n", count, array[0])); return B_OK; } @@ -303,7 +303,7 @@ Journal::WriteLogEntry() fVolume->SuperBlock().log_end = logPosition; fVolume->LogEnd() = logPosition; - fVolume->WriteSuperBlock(); + return fVolume->WriteSuperBlock(); } diff --git a/src/add-ons/kernel/file_systems/bfs/Stream.h b/src/add-ons/kernel/file_systems/bfs/Stream.h index e088668738..e4f42c54d2 100644 --- a/src/add-ons/kernel/file_systems/bfs/Stream.h +++ b/src/add-ons/kernel/file_systems/bfs/Stream.h @@ -454,8 +454,8 @@ Stream::ReadAt(off_t pos, uint8 *buffer, size_t *_length) int32 bytes = run.length << blockShift; #ifdef DEBUG - if (bytes > length) - DEBUGGER("bytes greater than length"); + if ((uint32)bytes > length) + DEBUGGER(("bytes greater than length")); #endif length -= bytes; bytesRead += bytes; diff --git a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp index 60ef2dd39f..d5a221b536 100644 --- a/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp @@ -793,7 +793,7 @@ bfs_write_stat(void *_ns, void *_node, struct stat *stat, long mask) } if (mask & WSTAT_MODE) { - PRINT(("original mode = %ld, stat->st_mode = %ld\n", node->mode, stat->st_mode)); + PRINT(("original mode = %ld, stat->st_mode = %d\n", node->mode, stat->st_mode)); node->mode = node->mode & ~S_IUMSK | stat->st_mode & S_IUMSK; } @@ -824,7 +824,7 @@ int bfs_create(void *_ns, void *_directory, const char *name, int omode, int mode, vnode_id *vnodeID, void **_cookie) { - FUNCTION_START(("name = \"%s\", perms = %ld, omode = %ld\n", name, mode, omode)); + FUNCTION_START(("name = \"%s\", perms = %d, omode = %d\n", name, mode, omode)); if (_ns == NULL || _directory == NULL || _cookie == NULL || name == NULL || *name == '\0') @@ -1419,7 +1419,7 @@ bfs_read_link(void *_ns, void *_node, char *buffer, size_t *bufferSize) int bfs_mkdir(void *_ns, void *_directory, const char *name, int mode) { - FUNCTION_START(("name = \"%s\", perms = %ld\n", name, mode)); + FUNCTION_START(("name = \"%s\", perms = %d\n", name, mode)); if (_ns == NULL || _directory == NULL || name == NULL || *name == '\0') @@ -1880,7 +1880,7 @@ bfs_read_indexdir(void *_ns, void *_cookie, long *num, struct dirent *dirent, si int bfs_create_index(void *_ns, const char *name, int type, int flags) { - FUNCTION_START(("name = \"%s\", type = %ld, flags = %ld\n", name, type, flags)); + FUNCTION_START(("name = \"%s\", type = %d, flags = %d\n", name, type, flags)); if (_ns == NULL || name == NULL || *name == '\0') return B_BAD_VALUE;