From e5926dc9969f98aa2123d726f583d078729d0b19 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Wed, 9 Feb 2011 11:29:23 -0800 Subject: [PATCH] Fix some Intel compiler warnings --- 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 424774b8..e1a673f0 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 9443f954..6d4bb28c 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 9d861a8a..4967fe88 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; -- 2.47.3