changeset 34139:cc8dfde2b6c5

Fix off_t printf conversion specifiers and related warnings.
author diego
date Thu, 20 Oct 2011 21:49:30 +0000
parents 00885417afc8
children a08f68ee111e
files libmpcodecs/ve_vfw.c libmpdemux/demux_nsv.c libmpdemux/muxer_avi.c stream/stream.h stream/stream_vstream.c sub/vobsub.c
diffstat 6 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_vfw.c	Thu Oct 20 16:42:31 2011 +0000
+++ b/libmpcodecs/ve_vfw.c	Thu Oct 20 21:49:30 2011 +0000
@@ -147,7 +147,7 @@
         return NULL;
       }
       fclose(fd);
-      mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %d bytes\n", st.st_size);
+      mp_msg(MSGT_WIN32,MSGL_ERR,"Compressor data %"PRIu64"d bytes\n", st.st_size);
       if (!(temp_len = (unsigned int) ICSendMessage(encoder_hic, ICM_SETSTATE, (LPARAM) drvdata, (int) st.st_size))){
         mp_msg(MSGT_WIN32,MSGL_ERR,"ICSetState failed!\n");
         free(drvdata);
--- a/libmpdemux/demux_nsv.c	Thu Oct 20 16:42:31 2011 +0000
+++ b/libmpdemux/demux_nsv.c	Thu Oct 20 21:49:30 2011 +0000
@@ -23,6 +23,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -75,7 +76,8 @@
     // sometimes instead of 0xBEEF as described for the next audio/video chunk we get
     // a whole new header
 
-    mp_dbg(MSGT_DEMUX,MSGL_DBG2,"demux_nsv: %08X %08X\n",hdr[0]<<8|hdr[1],stream_tell(demuxer->stream));
+    mp_dbg(MSGT_DEMUX, MSGL_DBG2, "demux_nsv: %08X %08"PRIu64"X\n",
+           hdr[0] << 8 | hdr[1], stream_tell(demuxer->stream));
     switch(hdr[0]<<8|hdr[1]) {
         case 0x4E53:
             if(hdr[2]==0x56 && hdr[3]==0x73){
--- a/libmpdemux/muxer_avi.c	Thu Oct 20 16:42:31 2011 +0000
+++ b/libmpdemux/muxer_avi.c	Thu Oct 20 21:49:30 2011 +0000
@@ -486,7 +486,9 @@
   } else {
     if (stream_tell(muxer->stream) != MOVIALIGN) {
 	mp_msg(MSGT_MUXER, MSGL_ERR, "Opendml superindex is too big for reserved space!\n");
-	mp_msg(MSGT_MUXER, MSGL_ERR, "Expected filepos %d, real filepos %ld, missing space %ld\n", MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream)-MOVIALIGN);
+        mp_msg(MSGT_MUXER, MSGL_ERR,
+               "Expected filepos %d, real filepos %"PRIu64"d, missing space %"PRIu64"d\n",
+               MOVIALIGN, stream_tell(muxer->stream), stream_tell(muxer->stream) - MOVIALIGN);
 	mp_msg(MSGT_MUXER, MSGL_ERR, "Try increasing MOVIALIGN in libmpdemux/muxer_avi.c\n");
     }
     write_avi_list(muxer->stream,listtypeAVIMOVIE,muxer->movi_end-stream_tell(muxer->stream)-12);
--- a/stream/stream.h	Thu Oct 20 16:42:31 2011 +0000
+++ b/stream/stream.h	Thu Oct 20 21:49:30 2011 +0000
@@ -294,11 +294,11 @@
 
 inline static int stream_seek(stream_t *s,off_t pos){
 
-  mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%llX\n", (long long)pos);
+  mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIu64"X\n", pos);
 
   if (pos < 0) {
-    mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid seek to negative position %llx!\n",
-           (long long)pos);
+    mp_msg(MSGT_DEMUX, MSGL_ERR,
+           "Invalid seek to negative position %"PRIu64"x!\n", pos);
     pos = 0;
   }
   if(pos<s->pos){
--- a/stream/stream_vstream.c	Thu Oct 20 16:42:31 2011 +0000
+++ b/stream/stream_vstream.c	Thu Oct 20 21:49:30 2011 +0000
@@ -153,7 +153,7 @@
 
   stream->start_pos = 0;
   stream->end_pos = vstream_streamsize();
-  mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %d\n", stream->end_pos);
+  mp_msg(MSGT_OPEN, MSGL_DBG2, "Tivo stream size is %"PRIu64"d\n", stream->end_pos);
 
   stream->priv = p;
   stream->fill_buffer = fill_buffer;
--- a/sub/vobsub.c	Thu Oct 20 16:42:31 2011 +0000
+++ b/sub/vobsub.c	Thu Oct 20 21:49:30 2011 +0000
@@ -21,6 +21,7 @@
 
 #include <ctype.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <limits.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -695,7 +696,7 @@
 {
     int h, m, s, ms;
     off_t filepos;
-    if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09lx",
+    if (sscanf(line, " %02d:%02d:%02d:%03d, filepos: %09"PRIu64"x",
                &h, &m, &s, &ms, &filepos) != 5)
         return -1;
     return vobsub_add_timestamp(vob, filepos, vob->delay + ms + 1000 * (s + 60 * (m + 60 * h)));