diff options
| -rw-r--r-- | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/PJ_chamb.c | 5 | ||||
| -rw-r--r-- | src/PJ_horner.c | 5 | ||||
| -rw-r--r-- | src/cct.c | 4 | ||||
| -rw-r--r-- | src/gie.c | 5 | ||||
| -rw-r--r-- | src/nad2bin.c | 5 | ||||
| -rw-r--r-- | src/optargpm.h | 10 | ||||
| -rw-r--r-- | src/pj_apply_gridshift.c | 5 | ||||
| -rw-r--r-- | src/pj_apply_vgridshift.c | 5 | ||||
| -rw-r--r-- | src/pj_datum_set.c | 5 | ||||
| -rw-r--r-- | src/pj_fileapi.c | 5 | ||||
| -rw-r--r-- | src/pj_gridinfo.c | 5 | ||||
| -rw-r--r-- | src/pj_gridlist.c | 5 | ||||
| -rw-r--r-- | src/pj_init.c | 5 | ||||
| -rw-r--r-- | src/pj_log.c | 5 | ||||
| -rw-r--r-- | src/pj_open_lib.c | 5 | ||||
| -rw-r--r-- | src/proj_4D_api.c | 4 |
17 files changed, 85 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9c9cdbf..33547190 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) project(PROJ4 C) set(PROJECT_INTERN_NAME PROJ) +if (NOT CMAKE_VERSION VERSION_LESS 3.1) + cmake_policy(SET CMP0054 NEW) +endif () # Set warnings if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") set(CMAKE_C_FLAGS "/WX ${CMAKE_C_FLAGS}") diff --git a/src/PJ_chamb.c b/src/PJ_chamb.c index d0b9250e..0a18ecf0 100644 --- a/src/PJ_chamb.c +++ b/src/PJ_chamb.c @@ -3,6 +3,11 @@ #include <proj.h> #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + typedef struct { double r, Az; } VECT; struct pj_opaque { struct { /* control point data */ diff --git a/src/PJ_horner.c b/src/PJ_horner.c index fe0452d6..2f564edf 100644 --- a/src/PJ_horner.c +++ b/src/PJ_horner.c @@ -82,6 +82,11 @@ #include <math.h> #include <errno.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + PROJ_HEAD(horner, "Horner polynomial evaluation"); /* make horner.h interface with proj's memory management */ @@ -81,6 +81,10 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 #include <string.h> #include <math.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif double proj_strtod(const char *str, char **endptr); double proj_atof(const char *str); @@ -119,7 +119,10 @@ Thomas Knudsen, thokn@sdfe.dk, 2017-10-01/2017-10-08 #include <math.h> #include <errno.h> - +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif /* from proj_strtod.c */ double proj_strtod(const char *str, char **endptr); diff --git a/src/nad2bin.c b/src/nad2bin.c index 8401df79..92ceab09 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -2,6 +2,11 @@ #include <stdio.h> #include <stdlib.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + #define PJ_LIB__ #include "proj_internal.h" #include "projects.h" diff --git a/src/optargpm.h b/src/optargpm.h index acb96583..c2b23466 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -193,6 +193,12 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-09-10 #include <math.h> #include <errno.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (push) +# pragma warning (disable: 4996) +#endif + /**************************************************************************************************/ struct OPTARGS; typedef struct OPTARGS OPTARGS; @@ -599,3 +605,7 @@ OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, return o; } + +#if defined(_MSC_VER) +# pragma warning (pop) +#endif diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c index a2267cbd..d8bd8b43 100644 --- a/src/pj_apply_gridshift.c +++ b/src/pj_apply_gridshift.c @@ -35,6 +35,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* pj_apply_gridshift() */ /* */ diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c index 6435b954..d5baf9e8 100644 --- a/src/pj_apply_vgridshift.c +++ b/src/pj_apply_vgridshift.c @@ -33,6 +33,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) { int itable = 0; double value = HUGE_VAL; diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c index c2fb1608..1622364c 100644 --- a/src/pj_datum_set.c +++ b/src/pj_datum_set.c @@ -29,6 +29,11 @@ #include <projects.h> #include <string.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /* SEC_TO_RAD = Pi/180/3600 */ #define SEC_TO_RAD 4.84813681109535993589914102357e-6 diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c index e223993e..9fd6a2b4 100644 --- a/src/pj_fileapi.c +++ b/src/pj_fileapi.c @@ -30,6 +30,11 @@ #include <projects.h> #include <string.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, const char *access); static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 9b9a8d82..9d69876e 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -34,6 +34,11 @@ #include <math.h> #include <errno.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* swap_words() */ /* */ diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index fbefdcea..5bc608d7 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -33,6 +33,11 @@ #include <string.h> #include <math.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static PJ_GRIDINFO *grid_list = NULL; #define PJ_MAX_PATH_LENGTH 1024 diff --git a/src/pj_init.c b/src/pj_init.c index 2d588ee4..a72dbec1 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -36,6 +36,11 @@ #include "proj_internal.h" #include "projects.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /* Maximum size of files using the "escape carriage return" feature */ #define MAX_CR_ESCAPE 65537 typedef struct { diff --git a/src/pj_log.c b/src/pj_log.c index bab5f078..3c4b7213 100644 --- a/src/pj_log.c +++ b/src/pj_log.c @@ -30,6 +30,11 @@ #include <string.h> #include <stdarg.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + /************************************************************************/ /* pj_stderr_logger() */ /************************************************************************/ diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 08532beb..35d0341f 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -35,6 +35,11 @@ #include <string.h> #include <errno.h> +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif + static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; static char **search_path = NULL; diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c index 5f4bf334..34c03db2 100644 --- a/src/proj_4D_api.c +++ b/src/proj_4D_api.c @@ -34,6 +34,10 @@ #include "projects.h" #include "geodesic.h" +#if defined(_MSC_VER) +// Squelch warnings about unsafe use of sprintf, etc +# pragma warning (disable: 4996) +#endif /* Initialize PJ_COORD struct */ PJ_COORD proj_coord (double x, double y, double z, double t) { |
