From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jody Bruchon Subject: [PATCH] Fix romfs void pointer compile error Date: Sat, 11 Feb 2012 01:28:42 -0500 Message-ID: <4F360A9A.2010905@jodybruchon.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030304070606070506050904" Return-path: Sender: linux-8086-owner@vger.kernel.org List-ID: To: linux-8086@vger.kernel.org This is a multi-part message in MIME format. --------------030304070606070506050904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit commit 82afea9a87740a766e5f2683bf27b312aab95572 Author: Jody Bruchon 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 Committed-by: Jody Bruchon --------------030304070606070506050904 Content-Type: text/plain; name="0001-fix_romfs_void_pointer.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-fix_romfs_void_pointer.patch" 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)); --------------030304070606070506050904--