* [PATCH] Fix romfs void pointer compile error
@ 2012-02-11 6:28 Jody Bruchon
0 siblings, 0 replies; only message in thread
From: Jody Bruchon @ 2012-02-11 6:28 UTC (permalink / raw)
To: linux-8086
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
commit 82afea9a87740a766e5f2683bf27b312aab95572
Author: Jody Bruchon <jody@jodybruchon.com>
Date: Sat Feb 11 01:17:00 2012 -0500
In elks/fs/romfs/inode.c, the function romfs_copyfrom() accepts
Void *dest, but an invalid lvalue error was generated by this:
((char *)dest) += maxsize;
By asking for char *dest instead, the function compiles properly.
Since romfs is "in development," I cannot test the code, but it
at least compiles now.
Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
Committed-by: Jody Bruchon <jody@jodybruchon.com>
[-- Attachment #2: 0001-fix_romfs_void_pointer.patch --]
[-- Type: text/plain, Size: 703 bytes --]
diff --git a/elks/fs/romfs/inode.c b/elks/fs/romfs/inode.c
index 551e99f..d1381d5 100644
--- a/elks/fs/romfs/inode.c
+++ b/elks/fs/romfs/inode.c
@@ -243,7 +243,7 @@ static int romfs_strnlen(struct inode *i, loff_t offset, size_t count)
return res;
}
-static int romfs_copyfrom(struct inode *i, void *dest, loff_t offset,
+static int romfs_copyfrom(struct inode *i, char *dest, loff_t offset,
size_t count)
{
struct buffer_head *bh;
@@ -279,7 +279,7 @@ static int romfs_copyfrom(struct inode *i, void *dest, loff_t offset,
while (res < count) {
offset += maxsize;
- ((char *) dest) += maxsize;
+ *dest += maxsize;
bh = bread(i->i_dev, (block_t) (offset >> ROMBSBITS));
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-11 6:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-11 6:28 [PATCH] Fix romfs void pointer compile error Jody Bruchon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.