From patchwork Mon Jan 18 16:30:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 8056101 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CD3EC9F859 for ; Mon, 18 Jan 2016 16:27:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09FB5203B1 for ; Mon, 18 Jan 2016 16:27:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C530F204AF for ; Mon, 18 Jan 2016 16:27:21 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F25992654CD; Mon, 18 Jan 2016 17:27:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 96D8426517F; Mon, 18 Jan 2016 17:26:49 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 10B12261B28; Mon, 18 Jan 2016 17:26:47 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id 6DB7626517F for ; Mon, 18 Jan 2016 17:26:29 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Jan 2016 08:26:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,313,1449561600"; d="scan'208";a="893076056" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.34]) by orsmga002.jf.intel.com with ESMTP; 18 Jan 2016 08:26:26 -0800 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Mon, 18 Jan 2016 22:00:01 +0530 Message-Id: <1453134603-25356-2-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453134603-25356-1-git-send-email-vinod.koul@intel.com> References: <1453134603-25356-1-git-send-email-vinod.koul@intel.com> Cc: tiwai@suse.de, Vinod Koul Subject: [alsa-devel] [PATCH 1/3] tinycompress: cplay: make functions static X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Sparse rightly complains some functions should be static so make them static cplay.c:100:5: warning: symbol 'parse_mp3_header' was not declared. Should it be static? cplay.c:129:5: warning: symbol 'check_codec_format_supported' was not declared. Should it be static? ../../include/tinycompress/tinymp3.h:66:11: warning: symbol 'mp3_sample_rates' was not declared. Should it be static? ../../include/tinycompress/tinymp3.h:72:11: warning: symbol 'mp3_bit_rates' was not declared. Should it be static? Signed-off-by: Vinod Koul --- include/tinycompress/tinymp3.h | 4 ++-- src/utils/cplay.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/tinycompress/tinymp3.h b/include/tinycompress/tinymp3.h index b7b45e3a6109..a709c397ee09 100644 --- a/include/tinycompress/tinymp3.h +++ b/include/tinycompress/tinymp3.h @@ -63,13 +63,13 @@ extern "C" { #define MP3_SYNC 0xe0ff -const int mp3_sample_rates[3][3] = { +static const int mp3_sample_rates[3][3] = { {44100, 48000, 32000}, /* MPEG-1 */ {22050, 24000, 16000}, /* MPEG-2 */ {11025, 12000, 8000}, /* MPEG-2.5 */ }; -const int mp3_bit_rates[3][3][15] = { +static const int mp3_bit_rates[3][3][15] = { { /* MPEG-1 */ { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448}, /* Layer 1 */ diff --git a/src/utils/cplay.c b/src/utils/cplay.c index 2d1a1760b3ec..032a97111402 100644 --- a/src/utils/cplay.c +++ b/src/utils/cplay.c @@ -97,7 +97,7 @@ struct mp3_header { uint8_t format2; }; -int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels, +static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *bit_rate) { int ver_idx, mp3_version, layer, bit_rate_idx, sample_rate_idx, channel_idx; @@ -126,7 +126,7 @@ int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels, return 0; } -int check_codec_format_supported(unsigned int card, unsigned int device, struct snd_codec *codec) +static int check_codec_format_supported(unsigned int card, unsigned int device, struct snd_codec *codec) { if (is_codec_supported(card, device, COMPRESS_IN, codec) == false) { fprintf(stderr, "Error: This codec or format is not supported by DSP\n");