Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>,
	Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Subject: [PATCH 2/5] cplay: remove dead code codec_name_from_id()
Date: Thu, 19 Apr 2018 12:06:17 +0530	[thread overview]
Message-ID: <1524119780-21206-2-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1524119780-21206-1-git-send-email-vinod.koul@intel.com>

The codec_name_from_id() was added but never used so remove it and
eliminate unused function warning

cplay.c:103:20: warning: ‘codec_name_from_id’ defined but not used [-Wunused-function]

We can take from git if user appears

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
CC: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>

 src/utils/cplay.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 98d71a2199da..b02644a3f2ea 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -100,20 +100,6 @@ static const struct {
 };
 #define CPLAY_NUM_CODEC_IDS (sizeof(codec_ids) / sizeof(codec_ids[0]))
 
-static const char *codec_name_from_id(unsigned int id)
-{
-	static char hexname[12];
-	int i;
-
-	for (i = 0; i < CPLAY_NUM_CODEC_IDS; ++i) {
-		if (codec_ids[i].id == id)
-			return codec_ids[i].name;
-	}
-
-	snprintf(hexname, sizeof(hexname), "0x%x", id);
-	return hexname; /* a static is safe because we're single-threaded */
-}
-
 static void usage(void)
 {
 	int i;
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2018-04-19  6:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  6:36 [PATCH 1/5] compress: remove dead code _is_codec_supported() Vinod Koul
2018-04-19  6:36 ` Vinod Koul [this message]
2018-04-19  6:36 ` [PATCH 3/5] cplay: remove dead code check_codec_format_supported() Vinod Koul
2018-04-19  6:36 ` [PATCH 4/5] cplay: fix incorrect print specifier warning Vinod Koul
2018-04-19  6:36 ` [PATCH 5/5] crecord: " Vinod Koul
2018-04-19  7:19 ` [PATCH 1/5] compress: remove dead code _is_codec_supported() Pierre-Louis Bossart
2018-04-19  8:08   ` Vinod Koul
2018-04-20 22:20     ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524119780-21206-2-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=suzuki.katsuhiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox