diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-22 16:22:34 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-22 16:22:34 +0200 |
commit | 46a06c23e30668d90cb5efb44eab05bb4577d08d (patch) | |
tree | 44749101e59434822b7f7f8f7e51fd184206d3d5 /Kernel/FileSystem | |
parent | 17acc1e0a862ed03dd1613851d4f9caec5297a50 (diff) | |
download | serenity-46a06c23e30668d90cb5efb44eab05bb4577d08d.zip |
Kernel: Fix all compiler warnings.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/DiskBackedFileSystem.cpp | 3 | ||||
-rw-r--r-- | Kernel/FileSystem/DiskBackedFileSystem.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/ProcFS.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/Kernel/FileSystem/DiskBackedFileSystem.cpp b/Kernel/FileSystem/DiskBackedFileSystem.cpp index afb4a8cc5f..d8b66803a1 100644 --- a/Kernel/FileSystem/DiskBackedFileSystem.cpp +++ b/Kernel/FileSystem/DiskBackedFileSystem.cpp @@ -139,8 +139,9 @@ ByteBuffer DiskBackedFS::read_blocks(unsigned index, unsigned count) const return blocks; } -void DiskBackedFS::set_block_size(unsigned block_size) +void DiskBackedFS::set_block_size(int block_size) { + ASSERT(block_size > 0); if (block_size == m_block_size) return; m_block_size = block_size; diff --git a/Kernel/FileSystem/DiskBackedFileSystem.h b/Kernel/FileSystem/DiskBackedFileSystem.h index 8f75435e71..d1b01e74d8 100644 --- a/Kernel/FileSystem/DiskBackedFileSystem.h +++ b/Kernel/FileSystem/DiskBackedFileSystem.h @@ -17,7 +17,7 @@ public: protected: explicit DiskBackedFS(NonnullRefPtr<DiskDevice>&&); - void set_block_size(unsigned); + void set_block_size(int); ByteBuffer read_block(unsigned index) const; ByteBuffer read_blocks(unsigned index, unsigned count) const; diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index fc712e9e99..b64fd70343 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -294,7 +294,7 @@ ByteBuffer procfs$pid_vmo(InodeIdentifier identifier) region->vmo().name().characters(), ®ion->vmo(), region->vmo().ref_count()); - for (size_t i = 0; i < region->vmo().page_count(); ++i) { + for (int i = 0; i < region->vmo().page_count(); ++i) { auto& physical_page = region->vmo().physical_pages()[i]; builder.appendf("P%x%s(%u) ", physical_page ? physical_page->paddr().get() : 0, |