diff options
| author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2015-05-30 23:51:20 -0400 |
|---|---|---|
| committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2015-05-30 23:51:20 -0400 |
| commit | 0ded560f320f03196233cf6a0eacb16b9f4db0cd (patch) | |
| tree | baa1b1fa8da20160c78765aff5936cb3f65cf09a /src | |
| parent | 603c73bf5c888ba9d6351260b2ee09ab26a5c2b4 (diff) | |
| download | PROJ-0ded560f320f03196233cf6a0eacb16b9f4db0cd.tar.gz PROJ-0ded560f320f03196233cf6a0eacb16b9f4db0cd.zip | |
Fix signed/unsigned comparison warnings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nad2bin.c | 2 | ||||
| -rw-r--r-- | src/nad_init.c | 4 | ||||
| -rw-r--r-- | src/pj_fileapi.c | 2 | ||||
| -rw-r--r-- | src/pj_gridinfo.c | 6 | ||||
| -rw-r--r-- | src/pj_gridlist.c | 2 | ||||
| -rw-r--r-- | src/pj_init.c | 2 | ||||
| -rw-r--r-- | src/pj_pr_list.c | 2 | ||||
| -rw-r--r-- | src/pj_strerrno.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/src/nad2bin.c b/src/nad2bin.c index 69515527..6587c638 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -359,7 +359,7 @@ int main(int argc, char **argv) { swap_words( row_buf, 4, ct.lim.lam * 4 ); if( fwrite( row_buf, sizeof(float), ct.lim.lam*4, fp ) - != 4 * ct.lim.lam ) + != (size_t)( 4 * ct.lim.lam ) ) { perror( "write()" ); exit( 2 ); diff --git a/src/nad_init.c b/src/nad_init.c index 84dc9867..3148eeb9 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -85,7 +85,7 @@ static void swap_words( void *data_in, int word_size, int word_count ) int nad_ctable_load( projCtx ctx, struct CTABLE *ct, PAFile fid ) { - int a_size; + size_t a_size; pj_ctx_fseek( ctx, fid, sizeof(struct CTABLE), SEEK_SET ); @@ -158,7 +158,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid ) int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, PAFile fid ) { - int a_size; + size_t a_size; pj_ctx_fseek( ctx, fid, 160, SEEK_SET ); diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c index c0b33693..0854dd09 100644 --- a/src/pj_fileapi.c +++ b/src/pj_fileapi.c @@ -185,7 +185,7 @@ char *pj_ctx_fgets(projCtx ctx, char *line, int size, PAFile file) bytes_read = pj_ctx_fread(ctx, line, 1, size-1, file); if(bytes_read == 0) return NULL; - if(bytes_read < size) + if(bytes_read < (size_t)size) { line[bytes_read] = '\0'; } diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 9bb1db64..d40e4d90 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -227,7 +227,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi ) if( pj_ctx_fread( ctx, row_buf, sizeof(double), gi->ct->lim.lam * 2, fid ) - != 2 * gi->ct->lim.lam ) + != (size_t)( 2 * gi->ct->lim.lam ) ) { pj_dalloc( row_buf ); pj_dalloc( ct_tmp.cvs ); @@ -305,7 +305,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi ) if( pj_ctx_fread( ctx, row_buf, sizeof(float), gi->ct->lim.lam*4, fid ) - != 4 * gi->ct->lim.lam ) + != (size_t)( 4 * gi->ct->lim.lam ) ) { pj_dalloc( row_buf ); pj_dalloc( ct_tmp.cvs ); @@ -370,7 +370,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi ) } if( pj_ctx_fread( ctx, ct_tmp.cvs, sizeof(float), words, fid ) - != words ) + != (size_t)words ) { pj_dalloc( ct_tmp.cvs ); pj_release_lock(); diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index 0ed66310..7cf781f1 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -178,7 +178,7 @@ PJ_GRIDINFO **pj_gridlist_from_nadgrids( projCtx ctx, const char *nadgrids, /* -------------------------------------------------------------------- */ for( s = nadgrids; *s != '\0'; ) { - int end_char; + size_t end_char; int required = 1; char name[128]; diff --git a/src/pj_init.c b/src/pj_init.c index a7de2df4..cae53003 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -54,7 +54,7 @@ typedef struct { static const char *fill_buffer(pj_read_state *state, const char *last_char) { size_t bytes_read; - int char_remaining, char_requested; + size_t char_remaining, char_requested; /* -------------------------------------------------------------------- */ /* Don't bother trying to read more if we are at eof, or if the */ diff --git a/src/pj_pr_list.c b/src/pj_pr_list.c index 2861aacf..95aab4a0 100644 --- a/src/pj_pr_list.c +++ b/src/pj_pr_list.c @@ -58,7 +58,7 @@ char *pj_get_def( PJ *P, int options ) paralist *t; int l; char *definition; - int def_max = 10; + size_t def_max = 10; (void) options; definition = (char *) pj_malloc(def_max); diff --git a/src/pj_strerrno.c b/src/pj_strerrno.c index 9d237039..b46f143c 100644 --- a/src/pj_strerrno.c +++ b/src/pj_strerrno.c @@ -71,7 +71,7 @@ pj_strerrno(int err) } #endif else if (err < 0) { - int adjusted_err = - err - 1; + size_t adjusted_err = - err - 1; if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *))) return(pj_err_list[adjusted_err]); else |
