Fix romfs void pointer compile error
PATCH 1/1 Fix romfs void pointer compile error
commit 82afea9a87740a766e5f2683bf27b312aab95572
Author: Jody Bruchon <[email protected]> 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 <[email protected]>
Committed-by Jody Bruchon <[email protected]>
elks/fs/romfs/inode.c +2 -2
@@ -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 ));