From: Jody Bruchon <jody@jodybruchon.com>
To: linux-8086@vger.kernel.org
Subject: [PATCH] Fix romfs void pointer compile error
Date: Sat, 11 Feb 2012 01:28:42 -0500 [thread overview]
Message-ID: <4F360A9A.2010905@jodybruchon.com> (raw)
[-- 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));
reply other threads:[~2012-02-11 6:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F360A9A.2010905@jodybruchon.com \
--to=jody@jodybruchon.com \
--cc=linux-8086@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.