From ea8ab9022a10cb62ef70d9eacefbb300c47051ce Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Thu, 19 Apr 2018 11:41:31 +0530 Subject: [PATCH] cplay: remove dead code codec_name_from_id() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/utils/cplay.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/utils/cplay.c b/src/utils/cplay.c index 98d71a2..b02644a 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.47.3