1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

Fix all current build warnings in the kernel.

This commit is contained in:
Andreas Kling 2018-11-09 10:03:21 +01:00
parent e71cb1c56b
commit 47b7eeda44
10 changed files with 28 additions and 19 deletions

View file

@ -84,13 +84,13 @@ ByteBuffer FileSystem::readEntireInode(InodeIdentifier inode, FileDescriptor* ha
for (;;) {
nread = readInodeBytes(inode, offset, sizeof(buffer), buffer, handle);
//kprintf("nread: %u, bufsiz: %u, initialSize: %u\n", nread, sizeof(buffer), initialSize);
ASSERT(nread <= sizeof(buffer));
ASSERT(nread <= (Unix::ssize_t)sizeof(buffer));
if (nread <= 0)
break;
memcpy(out, buffer, nread);
out += nread;
offset += nread;
ASSERT(offset <= initialSize); // FIXME: Support dynamically growing the buffer.
ASSERT(offset <= (Unix::ssize_t)initialSize); // FIXME: Support dynamically growing the buffer.
}
if (nread < 0) {
kprintf("[fs] readInode: ERROR: %d\n", nread);

View file

@ -398,6 +398,8 @@ bool VirtualFileSystem::touch(const String& path)
RetainPtr<FileDescriptor> VirtualFileSystem::open(CharacterDevice& device, int options)
{
// FIXME: Respect options.
(void) options;
auto vnode = getOrCreateNode(device);
if (!vnode)
return nullptr;
@ -419,6 +421,7 @@ RetainPtr<FileDescriptor> VirtualFileSystem::create(const String& path, InodeIde
{
// FIXME: Do the real thing, not just this fake thing!
(void) path;
(void) base;
m_rootNode->fileSystem()->createInode(m_rootNode->fileSystem()->rootInode(), "empty", 0100644, 0);
return nullptr;
}
@ -427,6 +430,7 @@ RetainPtr<FileDescriptor> VirtualFileSystem::mkdir(const String& path, InodeIden
{
// FIXME: Do the real thing, not just this fake thing!
(void) path;
(void) base;
m_rootNode->fileSystem()->makeDirectory(m_rootNode->fileSystem()->rootInode(), "mydir", 0400755);
return nullptr;
}