Commit d6daf2b9 authored by Fiona Glaser's avatar Fiona Glaser

Cosmetics: fix some signedness issues found by -Wsign-compare

parent 2246e451
......@@ -1160,7 +1160,7 @@ REDUCE_FRACTION( x264_reduce_fraction64, uint64_t )
char *x264_slurp_file( const char *filename )
{
int b_error = 0;
int i_size;
size_t i_size;
char *buf;
FILE *fh = fopen( filename, "rb" );
if( !fh )
......
......@@ -56,7 +56,7 @@ int x264_stack_align( void (*func)(), ... );
typedef struct
{
const char name[16];
int flags;
uint32_t flags;
} x264_cpu_name_t;
extern const x264_cpu_name_t x264_cpu_names[];
......
......@@ -1135,8 +1135,7 @@ void x264_me_refine_qpel_rd( x264_t *h, x264_me_t *m, int i_lambda2, int i4, int
int bmx = m->mv[0];
int bmy = m->mv[1];
int omx, omy, pmx, pmy;
unsigned bsatd;
int satd;
int satd, bsatd;
int dir = -2;
int i8 = i4>>2;
uint16_t amvd;
......
......@@ -27,7 +27,7 @@
#include "filters.h"
#define RETURN_IF_ERROR( cond, ... ) RETURN_IF_ERR( cond, "options", NULL, __VA_ARGS__ )
char **x264_split_string( char *string, char *sep, uint32_t limit )
char **x264_split_string( char *string, char *sep, int limit )
{
if( !string )
return NULL;
......
......@@ -30,7 +30,7 @@
#include "x264cli.h"
#include "filters/video/video.h"
char **x264_split_string( char *string, char *sep, uint32_t limit );
char **x264_split_string( char *string, char *sep, int limit );
void x264_free_string_array( char **array );
char **x264_split_options( const char *opt_str, const char *options[] );
......
......@@ -201,7 +201,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
static int read_frame_internal( cli_pic_t *pic, y4m_hnd_t *h )
{
int slen = strlen( Y4M_FRAME_MAGIC );
size_t slen = strlen( Y4M_FRAME_MAGIC );
int i = 0;
char header[16];
......
......@@ -328,11 +328,11 @@ static void print_csp_names( int longhelp )
printf( "\n" );
printf( " - valid csps for `lavf' demuxer:\n" );
printf( INDENT );
int line_len = strlen( INDENT );
size_t line_len = strlen( INDENT );
for( enum PixelFormat i = PIX_FMT_NONE+1; i < PIX_FMT_NB; i++ )
{
const char *pfname = av_pix_fmt_descriptors[i].name;
int name_len = strlen( pfname );
size_t name_len = strlen( pfname );
if( line_len + name_len > (80 - strlen( ", " )) )
{
printf( "\n" INDENT );
......
......@@ -34,7 +34,7 @@
typedef void *hnd_t;
static inline int64_t gcd( int64_t a, int64_t b )
static inline uint64_t gcd( uint64_t a, uint64_t b )
{
while( 1 )
{
......@@ -46,7 +46,7 @@ static inline int64_t gcd( int64_t a, int64_t b )
}
}
static inline int64_t lcm( int64_t a, int64_t b )
static inline uint64_t lcm( uint64_t a, uint64_t b )
{
return ( a / gcd( a, b ) ) * b;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment