From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4uO7-0001Kd-PY for qemu-devel@nongnu.org; Thu, 22 Apr 2010 07:16:07 -0400 Received: from [140.186.70.92] (port=41896 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4uO5-0001I8-OJ for qemu-devel@nongnu.org; Thu, 22 Apr 2010 07:16:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4uO1-00009m-6q for qemu-devel@nongnu.org; Thu, 22 Apr 2010 07:16:05 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:43476) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4uO0-00009I-Vk for qemu-devel@nongnu.org; Thu, 22 Apr 2010 07:16:01 -0400 Received: by fg-out-1718.google.com with SMTP id 19so328216fgg.10 for ; Thu, 22 Apr 2010 04:15:58 -0700 (PDT) Date: Thu, 22 Apr 2010 14:14:24 +0300 From: Serge Ziryukin Message-ID: <20100422111424.GA29800@ftrvxmtrx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline Subject: [Qemu-devel] [PATCH] audio/sdlaudio: remove unused variable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Remove unused 'shift' variable spotted by clang. Also clean up aud_to_sdlfmt which used to get the value of shift. Signed-off-by: Serge Ziryukin --- audio/sdlaudio.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) 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, con= st char *forfn) return sdl_post (s, forfn); } =20 -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 =3D 0; return AUDIO_S8; =20 case AUD_FMT_U8: - *shift =3D 0; return AUDIO_U8; =20 case AUD_FMT_S16: - *shift =3D 1; return AUDIO_S16LSB; =20 case AUD_FMT_U16: - *shift =3D 1; return AUDIO_U16LSB; =20 default: @@ -326,16 +322,13 @@ static int sdl_init_out (HWVoiceOut *hw, struct audse= ttings *as) SDLVoiceOut *sdl =3D (SDLVoiceOut *) hw; SDLAudioState *s =3D &glob_sdl; SDL_AudioSpec req, obt; - int shift; int endianess; int err; audfmt_e effective_fmt; struct audsettings obt_as; =20 - shift <<=3D as->nchannels =3D=3D 2; - req.freq =3D as->freq; - req.format =3D aud_to_sdlfmt (as->fmt, &shift); + req.format =3D aud_to_sdlfmt (as->fmt); req.channels =3D as->nchannels; req.samples =3D conf.nb_samples; req.callback =3D sdl_callback; --=20 1.7.0.5 --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkvQL5AACgkQUT3RpZIpZv501wCfRk79CMdkkHoFf9+tBL4DREDn EfcAn3ARfaOdiZThQWA/A1yIon6K/omu =JxJx -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--