]> git.alsa-project.org Git - tinycompress.git/commitdiff
cplay: fix incorrect print specifier warning
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:26:48 +0000 (11:56 +0530)
We get a warning in cplay for incorrect print specifier, fix it by using
right one %ld for long unsigned int.

cplay.c:327:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
   fprintf(stderr, "codec ID %d is not supported\n", codec_id);

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
src/utils/cplay.c

index d2c60f976c6c149999ccffdb204760cf1bb1bd49..ea36b8771caffb7d8f4dcfcda4c10054ab7c5e06 100644 (file)
@@ -324,7 +324,7 @@ void play_samples(char *name, unsigned int card, unsigned int device,
                get_codec_iec(file, &config, &codec);
                break;
        default:
-               fprintf(stderr, "codec ID %d is not supported\n", codec_id);
+               fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
                exit(EXIT_FAILURE);
        }