wineoss.drv: Move a function wide variable down to the block it is used in.
Michael Stefaniuc
mstefani at redhat.de
Thu Dec 13 17:18:05 CST 2007
This fixes the sparse warning:
dlls/wineoss.drv/mixer.c:1224:10: warning: symbol 'c' shadows an earlier one
The alternative would have been to remove the local 'c' variable and
use the function wide one. But the function is almost 200 lines long and
'c' is so descriptive ... .
---
dlls/wineoss.drv/mixer.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wineoss.drv/mixer.c b/dlls/wineoss.drv/mixer.c
index 22f580f..34588f9 100644
--- a/dlls/wineoss.drv/mixer.c
+++ b/dlls/wineoss.drv/mixer.c
@@ -1063,7 +1063,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
DWORD fdwDetails)
{
DWORD ret = MMSYSERR_NOTSUPPORTED;
- DWORD c, chnl;
+ DWORD chnl;
struct mixer* mix;
TRACE("(%04X, %p, %u);\n", wDevID, lpmcd, fdwDetails);
@@ -1084,7 +1084,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
TRACE("MIXER_GETCONTROLDETAILSF_VALUE (%08x)\n", lpmcd->dwControlID);
if (MIX_CheckControl(mix, lpmcd->dwControlID))
{
- c = lpmcd->dwControlID - 1;
+ DWORD c = lpmcd->dwControlID - 1;
chnl = HIWORD(mix->ctrl[c].dwLineID);
if (chnl == LINEID_DST)
chnl = LOWORD(mix->ctrl[c].dwLineID) ? SOUND_MIXER_RECLEV :
@@ -1221,7 +1221,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
ret = MMSYSERR_INVALPARAM;
if (MIX_CheckControl(mix, lpmcd->dwControlID))
{
- int c = lpmcd->dwControlID - 1;
+ DWORD c = lpmcd->dwControlID - 1;
if (mix->ctrl[c].ctrl.dwControlType == MIXERCONTROL_CONTROLTYPE_MUX ||
mix->ctrl[c].ctrl.dwControlType == MIXERCONTROL_CONTROLTYPE_MIXER)
--
1.5.3.7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071214/ee464a1f/attachment-0001.pgp
More information about the wine-patches
mailing list