From: Horst Schirmeier <horst@schirmeier.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: [PATCH] trivial fs/select.c compiler warning fix
Date: Sat, 8 Apr 2006 13:28:59 +0200 [thread overview]
Message-ID: <20060408112859.GS2335@quickstop.soohrt.org> (raw)
This trivial patch fixes
fs/select.c: In function `core_sys_select':
fs/select.c:339: warning: assignment from incompatible pointer type
fs/select.c:376: warning: comparison of distinct pointer types lacks a cast
by casting to (char *) when accessing stack_fds.
Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
---
diff --git a/fs/select.c b/fs/select.c
index 071660f..3025cec 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -336,7 +336,7 @@ static int core_sys_select(int n, fd_set
ret = -ENOMEM;
size = FDS_BYTES(n);
if (6*size < SELECT_STACK_ALLOC)
- bits = stack_fds;
+ bits = (char *) stack_fds;
else
bits = kmalloc(6 * size, GFP_KERNEL);
if (!bits)
@@ -373,7 +373,7 @@ static int core_sys_select(int n, fd_set
ret = -EFAULT;
out:
- if (bits != stack_fds)
+ if (bits != (char *) stack_fds)
kfree(bits);
out_nofds:
return ret;
--
PGP-Key 0xD40E0E7A
next reply other threads:[~2006-04-08 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-08 11:28 Horst Schirmeier [this message]
2006-04-08 11:46 ` [PATCH] trivial fs/select.c compiler warning fix Horst Schirmeier
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=20060408112859.GS2335@quickstop.soohrt.org \
--to=horst@schirmeier.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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.