diff mbox

audio/sdlaudio: remove unused variable

Message ID 20100422075522.GA17221@ftrvxmtrx
State New
Headers show

Commit Message

Serge Ziryukin April 22, 2010, 7:55 a.m. UTC
Remove unused 'shift' variable spotted by clang.
Also clean up aud_to_sdlfmt which used to get the value
of shift.
---
 audio/sdlaudio.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

Comments

malc April 22, 2010, 10:51 a.m. UTC | #1
On Thu, 22 Apr 2010, Serge Ziryukin wrote:

> Remove unused 'shift' variable spotted by clang.
> Also clean up aud_to_sdlfmt which used to get the value
> of shift.
> ---
>  audio/sdlaudio.c |   11 ++---------
>  1 files changed, 2 insertions(+), 9 deletions(-)

The patch submission lacks a sign off.

[..snip..]
diff mbox

Patch

diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c
index 8e7e5cb..c353016 100644
--- a/audio/sdlaudio.c
+++ b/audio/sdlaudio.c
@@ -115,23 +115,19 @@  static int sdl_unlock_and_post (SDLAudioState *s, const char *forfn)
     return sdl_post (s, forfn);
 }
 
-static int aud_to_sdlfmt (audfmt_e fmt, int *shift)
+static int aud_to_sdlfmt (audfmt_e fmt)
 {
     switch (fmt) {
     case AUD_FMT_S8:
-        *shift = 0;
         return AUDIO_S8;
 
     case AUD_FMT_U8:
-        *shift = 0;
         return AUDIO_U8;
 
     case AUD_FMT_S16:
-        *shift = 1;
         return AUDIO_S16LSB;
 
     case AUD_FMT_U16:
-        *shift = 1;
         return AUDIO_U16LSB;
 
     default:
@@ -326,16 +322,13 @@  static int sdl_init_out (HWVoiceOut *hw, struct audsettings *as)
     SDLVoiceOut *sdl = (SDLVoiceOut *) hw;
     SDLAudioState *s = &glob_sdl;
     SDL_AudioSpec req, obt;
-    int shift;
     int endianess;
     int err;
     audfmt_e effective_fmt;
     struct audsettings obt_as;
 
-    shift <<= as->nchannels == 2;
-
     req.freq = as->freq;
-    req.format = aud_to_sdlfmt (as->fmt, &shift);
+    req.format = aud_to_sdlfmt (as->fmt);
     req.channels = as->nchannels;
     req.samples = conf.nb_samples;
     req.callback = sdl_callback;