aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-06 22:18:23 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-02-06 23:33:15 +0100
commit9e1420309c075ff1cc74514e39d0cf6da1e4e19c (patch)
tree396a0aba2b2e0203ef72857299dd2105960cba3c /src
parentbd6148db5f5b9a0a13f3dc2d2c35a066c15a57ed (diff)
downloadPROJ-9e1420309c075ff1cc74514e39d0cf6da1e4e19c.tar.gz
PROJ-9e1420309c075ff1cc74514e39d0cf6da1e4e19c.zip
Travis: update CLang Static Analyzer to CLang 9
Enable optional checkers Fix two false positives
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
-rw-r--r--src/param.cpp2
-rw-r--r--src/proj_internal.h2
3 files changed, 3 insertions, 3 deletions
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 */