diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-07 21:10:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-07 21:10:42 +0100 |
| commit | b6f442db6c6b8a05fb9d824729cb4593e519edf8 (patch) | |
| tree | bd68798bc86ea1b192c5f25b6576f43a78458ac1 /src | |
| parent | ab68913e5b407861ae7d5aaeb876a64711805cb2 (diff) | |
| parent | c8f8a5a6c522fcd18b2ca42d4345bc9be115abd3 (diff) | |
| download | PROJ-b6f442db6c6b8a05fb9d824729cb4593e519edf8.tar.gz PROJ-b6f442db6c6b8a05fb9d824729cb4593e519edf8.zip | |
Merge pull request #1918 from rouault/update_travis_csa
Travis: update CLang Static Analyzer to CLang 9
Diffstat (limited to 'src')
| -rw-r--r-- | src/apps/projsync.cpp | 2 | ||||
| -rw-r--r-- | src/init.cpp | 2 | ||||
| -rw-r--r-- | src/param.cpp | 2 | ||||
| -rw-r--r-- | src/proj_internal.h | 2 | ||||
| -rw-r--r-- | src/projections/isea.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/apps/projsync.cpp b/src/apps/projsync.cpp index 3fab38e1..40848f51 100644 --- a/src/apps/projsync.cpp +++ b/src/apps/projsync.cpp @@ -52,7 +52,7 @@ class ParsingException : public std::exception { std::string msg_; public: - ParsingException(const char *msg) : msg_(msg) {} + explicit ParsingException(const char *msg) : msg_(msg) {} const char *what() const noexcept override { return msg_.c_str(); } }; } diff --git a/src/init.cpp b/src/init.cpp index 9c7b7b19..a25d1ccd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -239,7 +239,7 @@ Expand key from buffer or (if not in buffer) from init file char initname[5]; int exists; - memcpy(initname, xkey, 4); + strncpy(initname, xkey, 4); initname[4] = 0; if( strncmp(xkey, "epsg:", 5) == 0 ) { diff --git a/src/param.cpp b/src/param.cpp index 182c40b0..289faca3 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -85,7 +85,7 @@ paralist *pj_mkparam_ws (const char *str, const char **next_str) { newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len + 1); if (nullptr==newitem) return nullptr; - memmove(newitem->param, str, len); + memcpy(newitem->param, str, len); unquote_string(newitem->param); newitem->used = 0; diff --git a/src/proj_internal.h b/src/proj_internal.h index 7a777027..557c61cb 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -560,7 +560,7 @@ struct PJconsts { struct ARG_list { paralist *next; char used; -#if defined(__GNUC__) && __GNUC__ >= 8 +#if (defined(__GNUC__) && __GNUC__ >= 8) || (defined(__clang__) && __clang_major__ >= 9) char param[]; /* variable-length member */ /* Safer to use [] for gcc 8. See https://github.com/OSGeo/proj.4/pull/1087 */ /* and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86914 */ diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index 351739d4..801f2b82 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -733,7 +733,7 @@ static int isea_dddi_ap3odd(struct isea_dgg *g, int quadz, struct isea_pt *pt, quadz += 5; d = 0; } - } else if (quadz >= 6) { + } else /* if (quadz >= 6) */ { if (i == 0 && d == maxcoord) { /* south pole */ quadz = 11; @@ -812,7 +812,7 @@ static int isea_dddi(struct isea_dgg *g, int quadz, struct isea_pt *pt, h.y = -h.z; h.x = 0; } - } else if (quadz >= 6) { + } else /* if (quadz >= 6) */ { if (h.z == 0 && h.x == sidelength) { /* south pole */ quadz = 11; |
