* [PATCH] Remove one of sound/oss/cmpci.c compile warnings
@ 2003-10-28 18:14 Petri Koistinen
2003-11-02 5:05 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Petri Koistinen @ 2003-10-28 18:14 UTC (permalink / raw)
To: cltien, support; +Cc: trivial, linux-sound, linux-kernel
Hi!
This patch removes this compile warning:
sound/oss/cmpci.c: In function `cm_release_mixdev':
sound/oss/cmpci.c:1465: warning: unused variable `s'
GCC doesn't seem to unstand that VALIDATE_STATE macro uses s variable.
I hope this is correct way to fix this.
Petri
--- linux-2.6/sound/oss/cmpci.c.orig 2003-10-28 19:54:27.000000000 +0200
+++ linux-2.6/sound/oss/cmpci.c 2003-10-28 19:55:50.000000000 +0200
@@ -1462,7 +1462,9 @@
static int cm_release_mixdev(struct inode *inode, struct file *file)
{
- struct cm_state *s = (struct cm_state *)file->private_data;
+ struct cm_state *s;
+
+ s = (struct cm_state *)file->private_data;
VALIDATE_STATE(s);
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove one of sound/oss/cmpci.c compile warnings
2003-10-28 18:14 [PATCH] Remove one of sound/oss/cmpci.c compile warnings Petri Koistinen
@ 2003-11-02 5:05 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2003-11-02 5:05 UTC (permalink / raw)
To: Petri Koistinen; +Cc: cltien, support, linux-sound, linux-kernel
In message <Pine.LNX.4.58.0310282002530.4918@dsl-hkigw4g29.dial.inet.fi> you write:
> Hi!
>
> This patch removes this compile warning:
>
> sound/oss/cmpci.c: In function `cm_release_mixdev':
> sound/oss/cmpci.c:1465: warning: unused variable `s'
>
> GCC doesn't seem to unstand that VALIDATE_STATE macro uses s variable.
> I hope this is correct way to fix this.
Because it doesn't. A better change would be:
VALIDATE_STATE((struct cm_state *)file->private_data);
Or to remove the entire function.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-02 6:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 18:14 [PATCH] Remove one of sound/oss/cmpci.c compile warnings Petri Koistinen
2003-11-02 5:05 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).