From: Roman Zippel <[email protected]>
Date: 1135191147 -0500
avoid warnings about use of cast expressions as lvalues
Signed-off-by: Roman Zippel <[email protected]>
Signed-off-by: Al Viro <[email protected]>
---
sound/oss/dmasound/dmasound_paula.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
35e5bbe9630387309d6640ccedbbec134c3e6151
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index f163868..5417815 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -245,6 +245,7 @@ static ssize_t funcname(const u_char *us
u_char frame[], ssize_t *frameUsed, \
ssize_t frameLeft) \
{ \
+ const u_short *ptr = (const u_short *)userPtr; \
ssize_t count, used; \
u_short data; \
\
@@ -254,7 +255,7 @@ static ssize_t funcname(const u_char *us
count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \
used = count*2; \
while (count > 0) { \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*high++ = data>>8; \
@@ -269,12 +270,12 @@ static ssize_t funcname(const u_char *us
count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \
used = count*4; \
while (count > 0) { \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*lefth++ = data>>8; \
*leftl++ = (data>>2) & 0x3f; \
- if (get_user(data, ((u_short *)userPtr)++)) \
+ if (get_user(data, ptr++)) \
return -EFAULT; \
data = convsample(data); \
*righth++ = data>>8; \
--
0.99.9.GIT
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]