]> git.alsa-project.org Git - tinycompress.git/commitdiff
cplay: remove dead code codec_name_from_id()
authorVinod Koul <vinod.koul@intel.com>
Thu, 19 Apr 2018 06:11:31 +0000 (11:41 +0530)
committerVinod Koul <vinod.koul@intel.com>
Thu, 19 Apr 2018 06:19:24 +0000 (11:49 +0530)
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>
src/utils/cplay.c

index 98d71a2199daec1250ee30c5ce39f961fc6add9f..b02644a3f2ea1ca093a6411ed9ccc92eb6ac258c 100644 (file)
@@ -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;