[PATCH 1/2] BAT: eliminate compiler warnings due to printf type mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Explict type cast to (size_t) to eliminate compiler warnings.

Signed-off-by: Caleb Crome <caleb@xxxxxxxxx>
---
 bat/alsa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bat/alsa.c b/bat/alsa.c
index 582c604..b2aa34b 100644
--- a/bat/alsa.c
+++ b/bat/alsa.c
@@ -161,7 +161,7 @@ static int set_snd_pcm_params(struct bat *bat, struct pcm_container *sndpcm)
 	if (err < 0) {
 		fprintf(bat->err, _("Get parameter from device error: "));
 		fprintf(bat->err, _("period size: %zd %s: %s(%d)\n"),
-				sndpcm->period_size,
+				(size_t) sndpcm->period_size,
 				device_name, snd_strerror(err), err);
 		return err;
 	}
@@ -170,7 +170,7 @@ static int set_snd_pcm_params(struct bat *bat, struct pcm_container *sndpcm)
 	if (err < 0) {
 		fprintf(bat->err, _("Get parameter from device error: "));
 		fprintf(bat->err, _("buffer size: %zd %s: %s(%d)\n"),
-				sndpcm->buffer_size,
+				(size_t) sndpcm->buffer_size,
 				device_name, snd_strerror(err), err);
 		return err;
 	}
@@ -178,7 +178,7 @@ static int set_snd_pcm_params(struct bat *bat, struct pcm_container *sndpcm)
 	if (sndpcm->period_size == sndpcm->buffer_size) {
 		fprintf(bat->err, _("Invalid parameters: can't use period "));
 		fprintf(bat->err, _("equal to buffer size (%zd)\n"),
-				sndpcm->period_size);
+				(size_t) sndpcm->period_size);
 		return -EINVAL;
 	}
 
-- 
2.6.1

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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux