From patchwork Thu Apr 22 07:55:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Ziryukin X-Patchwork-Id: 50702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B50A3B7D17 for ; Thu, 22 Apr 2010 17:58:42 +1000 (EST) Received: from localhost ([127.0.0.1]:36793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4rJ0-0003dq-Nx for incoming@patchwork.ozlabs.org; Thu, 22 Apr 2010 03:58:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4rGH-0003cd-Ia for qemu-devel@nongnu.org; Thu, 22 Apr 2010 03:55:49 -0400 Received: from [140.186.70.92] (port=57219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4rGE-0003bs-NX for qemu-devel@nongnu.org; Thu, 22 Apr 2010 03:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4rGD-00057p-It for qemu-devel@nongnu.org; Thu, 22 Apr 2010 03:55:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:60349) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4rGD-00057g-0b for qemu-devel@nongnu.org; Thu, 22 Apr 2010 03:55:45 -0400 Received: by fg-out-1718.google.com with SMTP id 16so173151fgg.10 for ; Thu, 22 Apr 2010 00:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=cBWwEv0OK6qayjjaTeeB8RjTYe0JeWwqZTmVgDe9uzM=; b=tnBjaqn+r+UWoGMZEpqqNvcIILJfvwYjaYHfRR3k/XtcDpd/Q/Inm3pvCAnzULdEKC 3ldPBMwZsk9kvKNhu6II+iwzR9Ni0YuefjdSkNChqomcjzIazYc0dw3kOeIrGdAVUBE4 UqjXK13ESgR+pHcdW7kfoq8Um2DIC/Jg7YC+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=fXpRcW9us4c7+eTA/WnrAa9ApA/Rn2aExYR8cwGtysGjEdDHBPvyrKJenFroIrsOj/ HHkQSBWeiISDlWmztJtdPgqlzaPyZ7yc82XiEarXqeDV6Z0xkGesAUtM6MVvencJx67A dji+vpSzZr31Pgc/Z2wl/auiFbftk+jb3Th5c= Received: by 10.223.20.216 with SMTP id g24mr355427fab.63.1271922943255; Thu, 22 Apr 2010 00:55:43 -0700 (PDT) Received: from ftrvxmtrx@gmail.com ([212.98.167.157]) by mx.google.com with ESMTPS id k29sm2903337fkk.15.2010.04.22.00.55.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Apr 2010 00:55:42 -0700 (PDT) Received: by ftrvxmtrx@gmail.com (sSMTP sendmail emulation); Thu, 22 Apr 2010 10:55:22 +0300 Date: Thu, 22 Apr 2010 10:55:22 +0300 From: Serge Ziryukin To: qemu-devel@nongnu.org Message-ID: <20100422075522.GA17221@ftrvxmtrx> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18-muttng (2008-05-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] audio/sdlaudio: remove unused variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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(-) 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;