LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 6/8] sound: pcxhr_core.c fix shadowed variable warning
@ 2008-02-28 19:11 Harvey Harrison
0 siblings, 0 replies; only message in thread
From: Harvey Harrison @ 2008-02-28 19:11 UTC (permalink / raw)
To: Takashi Iwai; +Cc: LKML
Inner loop redeclares err with u32 rather than int, stupid fix here
is to change the inner err to err2.
sound/pci/pcxhr/pcxhr_core.c:1008:8: warning: symbol 'err' shadows an earlier one
sound/pci/pcxhr/pcxhr_core.c:983:6: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
sound/pci/pcxhr/pcxhr_core.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c
index c4e415d..5287a80 100644
--- a/sound/pci/pcxhr/pcxhr_core.c
+++ b/sound/pci/pcxhr/pcxhr_core.c
@@ -1005,29 +1005,29 @@ void pcxhr_msg_tasklet(unsigned long arg)
int nb_stream = (prmh->stat[i] >> (2*FIELD_SIZE)) & MASK_FIRST_FIELD;
int pipe = prmh->stat[i] & MASK_FIRST_FIELD;
int is_capture = prmh->stat[i] & 0x400000;
- u32 err;
+ u32 err2;
if (prmh->stat[i] & 0x800000) { /* if BIT_END */
snd_printdd("TASKLET : End%sPipe %d\n",
is_capture ? "Record" : "Play", pipe);
}
i++;
- err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
- if (err)
- pcxhr_handle_async_err(mgr, err, PCXHR_ERR_PIPE,
+ err2 = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
+ if (err2)
+ pcxhr_handle_async_err(mgr, err2, PCXHR_ERR_PIPE,
pipe, is_capture);
i += 2;
for (j = 0; j < nb_stream; j++) {
- err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
- if (err)
- pcxhr_handle_async_err(mgr, err, PCXHR_ERR_STREAM,
+ err2 = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
+ if (err2)
+ pcxhr_handle_async_err(mgr, err2, PCXHR_ERR_STREAM,
pipe, is_capture);
i += 2;
}
for (j = 0; j < nb_audio; j++) {
- err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
- if (err)
- pcxhr_handle_async_err(mgr, err, PCXHR_ERR_AUDIO,
+ err2 = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
+ if (err2)
+ pcxhr_handle_async_err(mgr, err2, PCXHR_ERR_AUDIO,
pipe, is_capture);
i += 2;
}
--
1.5.4.3.342.g99e8
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-28 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 19:11 [PATCH 6/8] sound: pcxhr_core.c fix shadowed variable warning Harvey Harrison
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).