diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-02-26 13:36:32 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-02-26 13:39:00 +0100 |
| commit | abb21adb39de752b427e1e6fc66d94cfc9c3ee04 (patch) | |
| tree | 81ed826114ede8567148b92871896ae7412d9cac /src | |
| parent | 8eb46dbbb63d7a880ac787561c907491cffc0917 (diff) | |
| download | PROJ-abb21adb39de752b427e1e6fc66d94cfc9c3ee04.tar.gz PROJ-abb21adb39de752b427e1e6fc66d94cfc9c3ee04.zip | |
Fix MSVC warnings and add /Wx to appveyor.yml
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_horner.c | 6 | ||||
| -rw-r--r-- | src/PJ_pipeline.c | 4 | ||||
| -rw-r--r-- | src/nad_init.c | 6 | ||||
| -rw-r--r-- | src/pj_init.c | 6 | ||||
| -rw-r--r-- | src/pj_open_lib.c | 4 | ||||
| -rw-r--r-- | src/pj_param.c | 2 | ||||
| -rw-r--r-- | src/pj_pr_list.c | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/src/PJ_horner.c b/src/PJ_horner.c index 3dde29c8..4ee2e78a 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -134,7 +134,7 @@ static void horner_free (HORNER *h) { static HORNER *horner_alloc (size_t order, int complex_polynomia) { /* size_t is unsigned, so we need not check for order > 0 */ - int n = horner_number_of_coefficients(order); + int n = (int)horner_number_of_coefficients(order); int polynomia_ok = 0; HORNER *h = horner_calloc (1, sizeof (HORNER)); @@ -142,8 +142,8 @@ static HORNER *horner_alloc (size_t order, int complex_polynomia) { return 0; if (complex_polynomia) - n = 2*order + 2; - h->order = order; + n = 2*(int)order + 2; + h->order = (int)order; h->coefs = n; if (complex_polynomia) { diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c index 0dae0e59..e61954a0 100644 --- a/src/PJ_pipeline.c +++ b/src/PJ_pipeline.c @@ -309,7 +309,7 @@ static PJ *pj_create_pipeline (PJ *P, size_t steps) { if (0==P->opaque->pipeline) return 0; - P->opaque->steps = steps; + P->opaque->steps = (int)steps; P->opaque->reverse_step = pj_calloc (steps + 2, sizeof(int)); if (0==P->opaque->reverse_step) @@ -369,7 +369,7 @@ PJ *PROJECTION(pipeline) { if (0==P->opaque) return 0; - argc = argc_params (P->params); + argc = (int)argc_params (P->params); P->opaque->argv = argv = argv_params (P->params, argc); if (0==argv) return pipeline_freeup (P, ENOMEM); diff --git a/src/nad_init.c b/src/nad_init.c index 3b35ea63..14fa5226 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -134,7 +134,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid ) } /* trim white space and newlines off id */ - for( id_end = strlen(ct->id)-1; id_end > 0; id_end-- ) + for( id_end = (int)strlen(ct->id)-1; id_end > 0; id_end-- ) { if( ct->id[id_end] == '\n' || ct->id[id_end] == ' ' ) ct->id[id_end] = '\0'; @@ -181,7 +181,7 @@ int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, PAFile fid ) if( !IS_LSB ) { - swap_words( ct->cvs, 4, a_size * 2 ); + swap_words( ct->cvs, 4, (int)a_size * 2 ); } return 1; @@ -243,7 +243,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid ) } /* trim white space and newlines off id */ - for( id_end = strlen(ct->id)-1; id_end > 0; id_end-- ) + for( id_end = (int)strlen(ct->id)-1; id_end > 0; id_end-- ) { if( ct->id[id_end] == '\n' || ct->id[id_end] == ' ' ) ct->id[id_end] = '\0'; diff --git a/src/pj_init.c b/src/pj_init.c index 24aece84..62901fdf 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -73,7 +73,7 @@ static const char *fill_buffer(pj_read_state *state, const char *last_char) /* Move the existing data to the start of the buffer. */ /* -------------------------------------------------------------------- */ memmove(state->buffer, last_char, char_remaining); - state->buffer_filled = char_remaining; + state->buffer_filled = (int)char_remaining; last_char = state->buffer; /* -------------------------------------------------------------------- */ @@ -116,7 +116,7 @@ static const char *fill_buffer(pj_read_state *state, const char *last_char) *w++ = *r++; } *w = 0; - state->buffer_filled += (bytes_read - (r-w)); + state->buffer_filled += (int)(bytes_read - (r-w)); return last_char; } @@ -139,7 +139,7 @@ get_opt(projCtx ctx, paralist **start, PAFile fid, char *name, paralist *next, if(found_def) *found_def = 0; - len = strlen(name); + len = (int)strlen(name); *sword = 't'; if (0==next_char) diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 0a2e7fec..d5ad2549 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -113,7 +113,7 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) { if (*name == '~' && strchr(dir_chars,name[1]) ) if ((sysname = getenv("HOME")) != NULL) { (void)strcpy(fname, sysname); - fname[n = strlen(fname)] = DIR_CHAR; + fname[n = (int)strlen(fname)] = DIR_CHAR; fname[++n] = '\0'; (void)strcpy(fname+n, name + 1); sysname = fname; @@ -134,7 +134,7 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) { /* or is environment PROJ_LIB defined */ else if ((sysname = getenv("PROJ_LIB")) || (sysname = proj_lib_name)) { (void)strcpy(fname, sysname); - fname[n = strlen(fname)] = DIR_CHAR; + fname[n = (int)strlen(fname)] = DIR_CHAR; fname[++n] = '\0'; (void)strcpy(fname+n, name); sysname = fname; diff --git a/src/pj_param.c b/src/pj_param.c index 24c2354e..93f5cf53 100644 --- a/src/pj_param.c +++ b/src/pj_param.c @@ -45,7 +45,7 @@ pj_param(projCtx ctx, paralist *pl, const char *opt) { type = *opt++; /* simple linear lookup */ - l = strlen(opt); + l = (int)strlen(opt); while (pl && !(!strncmp(pl->param, opt, l) && (!pl->param[l] || pl->param[l] == '='))) pl = pl->next; diff --git a/src/pj_pr_list.c b/src/pj_pr_list.c index 95aab4a0..5ccfbe5b 100644 --- a/src/pj_pr_list.c +++ b/src/pj_pr_list.c @@ -11,7 +11,7 @@ pr_list(PJ *P, int not_used) { (void)putchar('#'); for (t = P->params; t; t = t->next) if ((!not_used && t->used) || (not_used && !t->used)) { - l = strlen(t->param) + 1; + l = (int)strlen(t->param) + 1; if (n + l > LINE_LEN) { (void)fputs("\n#", stdout); n = 2; @@ -71,7 +71,7 @@ char *pj_get_def( PJ *P, int options ) continue; /* grow the resulting string if needed */ - l = strlen(t->param) + 1; + l = (int)strlen(t->param) + 1; if( strlen(definition) + l + 5 > def_max ) { char *def2; |
