[x264-devel] Fix some Intel compiler warnings

Anton Mitrofanov git at videolan.org
Sat Feb 19 00:34:07 CET 2011


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Wed Feb  9 11:29:23 2011 -0800| [e5926dc9969f98aa2123d726f583d078729d0b19] | committer: Jason Garrett-Glaser

Fix some Intel compiler warnings

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e5926dc9969f98aa2123d726f583d078729d0b19
---

 encoder/ratecontrol.c |    6 +++---
 input/raw.c           |    4 ++--
 input/y4m.c           |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 424774b..e1a673f 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -981,11 +981,11 @@ static int parse_zone( x264_t *h, x264_zone_t *z, char *p )
     char *tok, UNUSED *saveptr=NULL;
     z->param = NULL;
     z->f_bitrate_factor = 1;
-    if( 3 <= sscanf(p, "%u,%u,q=%u%n", &z->i_start, &z->i_end, &z->i_qp, &len) )
+    if( 3 <= sscanf(p, "%d,%d,q=%d%n", &z->i_start, &z->i_end, &z->i_qp, &len) )
         z->b_force_qp = 1;
-    else if( 3 <= sscanf(p, "%u,%u,b=%f%n", &z->i_start, &z->i_end, &z->f_bitrate_factor, &len) )
+    else if( 3 <= sscanf(p, "%d,%d,b=%f%n", &z->i_start, &z->i_end, &z->f_bitrate_factor, &len) )
         z->b_force_qp = 0;
-    else if( 2 <= sscanf(p, "%u,%u%n", &z->i_start, &z->i_end, &len) )
+    else if( 2 <= sscanf(p, "%d,%d%n", &z->i_start, &z->i_end, &len) )
         z->b_force_qp = 0;
     else
     {
diff --git a/input/raw.c b/input/raw.c
index 9443f95..6d4bb28 100644
--- a/input/raw.c
+++ b/input/raw.c
@@ -47,11 +47,11 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     {
         /* try to parse the file name */
         for( char *p = psz_filename; *p; p++ )
-            if( *p >= '0' && *p <= '9' && sscanf( p, "%ux%u", &info->width, &info->height ) == 2 )
+            if( *p >= '0' && *p <= '9' && sscanf( p, "%dx%d", &info->width, &info->height ) == 2 )
                 break;
     }
     else
-        sscanf( opt->resolution, "%ux%u", &info->width, &info->height );
+        sscanf( opt->resolution, "%dx%d", &info->width, &info->height );
     FAIL_IF_ERROR( !info->width || !info->height, "raw input requires a resolution.\n" )
     if( opt->colorspace )
     {
diff --git a/input/y4m.c b/input/y4m.c
index 9d861a8..4967fe8 100644
--- a/input/y4m.c
+++ b/input/y4m.c
@@ -136,7 +136,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
                 }
                 break;
             case 'F': /* Frame rate - 0:0 if unknown */
-                if( sscanf( tokstart, "%d:%d", &n, &d ) == 2 && n && d )
+                if( sscanf( tokstart, "%u:%u", &n, &d ) == 2 && n && d )
                 {
                     x264_reduce_fraction( &n, &d );
                     info->fps_num = n;
@@ -146,7 +146,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
                 break;
             case 'A': /* Pixel aspect - 0:0 if unknown */
                 /* Don't override the aspect ratio if sar has been explicitly set on the commandline. */
-                if( sscanf( tokstart, "%d:%d", &n, &d ) == 2 && n && d )
+                if( sscanf( tokstart, "%u:%u", &n, &d ) == 2 && n && d )
                 {
                     x264_reduce_fraction( &n, &d );
                     info->sar_width  = n;



More information about the x264-devel mailing list