changeset 25308:7fdb9b2b6770

Fix printf format string length modifiers, removes the warnings: asfinfo.c: In function 'print_wave_header': asfinfo.c:114: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c:115: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c: In function 'print_video_header': asfinfo.c:140: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c:141: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c:142: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c:145: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c:146: warning: format '%d' expects type 'int', but argument 2 has type 'long int' asfinfo.c: In function 'main': asfinfo.c:174: warning: format '%X' expects type 'unsigned int', but argument 2 has type 'long int' asfinfo.c:220: warning: format '%d' expects type 'int', but argument 6 has type 'long unsigned int'
author diego
date Mon, 10 Dec 2007 13:11:26 +0000
parents 46ae8efba443
children 8e73e469970c
files TOOLS/asfinfo.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/TOOLS/asfinfo.c	Mon Dec 10 12:35:28 2007 +0000
+++ b/TOOLS/asfinfo.c	Mon Dec 10 13:11:26 2007 +0000
@@ -111,8 +111,8 @@
   
   printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag);
   printf("Channels: %d\n",h->nChannels);
-  printf("Samplerate: %d\n",h->nSamplesPerSec);
-  printf("avg byte/sec: %d\n",h->nAvgBytesPerSec);
+  printf("Samplerate: %ld\n",h->nSamplesPerSec);
+  printf("avg byte/sec: %ld\n",h->nAvgBytesPerSec);
   printf("Block align: %d\n",h->nBlockAlign);
   printf("bits/sample: %d\n",h->wBitsPerSample);
   printf("cbSize: %d\n",h->cbSize);
@@ -137,13 +137,13 @@
 
 void print_video_header(BITMAPINFOHEADER *h){
   printf("======= VIDEO Format ======\n");
-	printf("  biSize %d\n", h->biSize);
-	printf("  biWidth %d\n", h->biWidth);
-	printf("  biHeight %d\n", h->biHeight);
+	printf("  biSize %ld\n", h->biSize);
+	printf("  biWidth %ld\n", h->biWidth);
+	printf("  biHeight %ld\n", h->biHeight);
 	printf("  biPlanes %d\n", h->biPlanes);
 	printf("  biBitCount %d\n", h->biBitCount);
-	printf("  biCompression %d='%.4s'\n", h->biCompression, &h->biCompression);
-	printf("  biSizeImage %d\n", h->biSizeImage);
+	printf("  biCompression %ld='%.4s'\n", h->biCompression, &h->biCompression);
+	printf("  biSizeImage %ld\n", h->biSizeImage);
   printf("===========================\n");
 }
 
@@ -171,7 +171,7 @@
       printf("stream type: %s\n",chunk_type(streamh.type));
       printf("stream concealment: %s\n",chunk_type(streamh.concealment));
       printf("type: %d bytes,  stream: %d bytes  ID: %d\n",(int)streamh.type_size,(int)streamh.stream_size,(int)streamh.stream_no);
-      printf("FILEPOS=0x%X\n",ftell(f));
+      printf("FILEPOS=0x%lX\n",ftell(f));
       // type-specific data:
       fread(buffer,streamh.type_size,1,f);
       switch(*((unsigned int*)&streamh.type)){
@@ -216,7 +216,7 @@
             if(flags&1){
               segs=p[0]-0x80;++p;
             }
-            printf("%08X:  flag=%02X  segs=%d  pad=%d  time=%d  dur=%d\n",
+            printf("%08X:  flag=%02X  segs=%d  pad=%d  time=%ld  dur=%d\n",
               fpos,flags,segs,padding,time,duration);
             for(seg=0;seg<segs;seg++){
               ASF_segmhdr_t* sh=(ASF_segmhdr_t*)p;