diff mbox

[4/5] cplay: fix incorrect print specifier warning

Message ID 1524119780-21206-4-git-send-email-vinod.koul@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vinod Koul April 19, 2018, 6:36 a.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index d2c60f976c6c..ea36b8771caf 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -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);
 	}