[MPlayer-cvslog] r31875 - trunk/libmpdemux/muxer_mpeg.c

diego subversion at mplayerhq.hu
Sat Jul 31 18:05:19 CEST 2010


Author: diego
Date: Sat Jul 31 18:05:19 2010
New Revision: 31875

Log:
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'

Modified:
   trunk/libmpdemux/muxer_mpeg.c

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	Sat Jul 31 17:22:11 2010	(r31874)
+++ trunk/libmpdemux/muxer_mpeg.c	Sat Jul 31 18:05:19 2010	(r31875)
@@ -1657,7 +1657,7 @@ static size_t parse_mpeg12_video(muxer_s
 	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 @@ static size_t parse_mpeg12_video(muxer_s
 	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 @@ static size_t parse_mpeg4_video(muxer_st
 	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 @@ static size_t parse_mpeg4_video(muxer_st
 	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 @@ static void mpegfile_write_chunk(muxer_s
 			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;


More information about the MPlayer-cvslog mailing list