changeset 31798:2d9044967a46

Add 'z' length modifier to %d printf format specifiers for size_t arguments. This silences the following warnings on OS X with gcc 4.2.1: libmpdemux/muxer_mpeg.c:1660: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' libmpdemux/muxer_mpeg.c:1784: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' libmpdemux/muxer_mpeg.c:1873: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' libmpdemux/muxer_mpeg.c:1930: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' libmpdemux/muxer_mpeg.c:2362: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
author diego
date Sat, 31 Jul 2010 16:05:19 +0000
parents 895706bb6e5c
children fe2e3c755706
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Sat Jul 31 15:22:11 2010 +0000
+++ b/libmpdemux/muxer_mpeg.c	Sat Jul 31 16:05:19 2010 +0000
@@ -1657,7 +1657,7 @@
 	mp_msg(MSGT_MUXER, MSGL_DBG2,"parse_mpeg12_video, len=%u\n", (uint32_t) len);
 	if(s->buffer[0] != 0 || s->buffer[1] != 0 || s->buffer[2] != 1 || len<6)
 	{
-		mp_msg(MSGT_MUXER, MSGL_ERR,"Unknown video format, possibly non-MPEG1/2 stream, len=%d!\n", len);
+		mp_msg(MSGT_MUXER, MSGL_ERR,"Unknown video format, possibly non-MPEG1/2 stream, len=%zd!\n", len);
 		return 0;
 	}
 
@@ -1781,7 +1781,7 @@
 	ret = add_frame(spriv, spriv->delta_pts, s->buffer, len, pt, spriv->last_dts, spriv->last_pts);
 	if(ret < 0)
 	{
-		mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG12: add_frames(%d) failed, exit\r\n", len);
+		mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG12: add_frames(%zd) failed, exit\r\n", len);
 		return 0;
 	}
 	mp_msg(MSGT_MUXER, MSGL_DBG2, "\r\nVIDEO FRAME, PT: %C, tr: %d, diff: %d, dts: %.3lf, pts: %.3lf, pdt: %u, gop_reset: %d\r\n",
@@ -1870,7 +1870,7 @@
 	mp_msg(MSGT_MUXER, MSGL_DBG2,"parse_mpeg4_video, len=%u\n", (uint32_t) len);
 	if(len<6)
 	{
-		mp_msg(MSGT_MUXER, MSGL_ERR,"Frame too short: %d, exit!\n", len);
+		mp_msg(MSGT_MUXER, MSGL_ERR,"Frame too short: %zd, exit!\n", len);
 		return 0;
 	}
 
@@ -1927,7 +1927,7 @@
 	ret = add_frame(vpriv, delta_pts, s->buffer, len, pt, vpriv->last_dts, vpriv->last_pts);
 	if(ret < 0)
 	{
-		mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG4: add_frames(%d) failed, exit\r\n", len);
+		mp_msg(MSGT_MUXER, MSGL_FATAL, "\r\nPARSE_MPEG4: add_frames(%zd) failed, exit\r\n", len);
 		return 0;
 	}
 
@@ -2359,7 +2359,7 @@
 			tmp = realloc(s->b_buffer, len  + s->b_buffer_len);
 			if(!tmp)
 			{
-				mp_msg(MSGT_MUXER, MSGL_FATAL, "\nFATAL! couldn't realloc %d bytes\n", len  + s->b_buffer_len);
+				mp_msg(MSGT_MUXER, MSGL_FATAL, "\nFATAL! couldn't realloc %zd bytes\n", len  + s->b_buffer_len);
 				return;
 			}
 			s->b_buffer = tmp;