From 7ad9654a05451cb77e508cee00e45a695512a57c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Mar 2018 21:21:40 +0100 Subject: Add a few cppcheck suppressions --- src/PJ_isea.c | 4 +++- src/geodesic.c | 1 + src/geodtest.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/PJ_isea.c b/src/PJ_isea.c index d922ecbb..57412a38 100644 --- a/src/PJ_isea.c +++ b/src/PJ_isea.c @@ -149,7 +149,9 @@ enum snyder_polyhedron { }; struct snyder_constants { - double g, G, theta, ea_w, ea_a, ea_b, g_w, g_a, g_b; + double g, G, theta; + /* cppcheck-suppress unusedStructMember */ + double ea_w, ea_a, ea_b, g_w, g_a, g_b; }; /* TODO put these in radians to avoid a later conversion */ diff --git a/src/geodesic.c b/src/geodesic.c index d62fdd99..a7e4376a 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -94,6 +94,7 @@ static void Init() { #else { real minus1 = -1; + /* cppcheck-suppress wrongmathcall */ NaN = sqrt(minus1); } #endif diff --git a/src/geodtest.c b/src/geodtest.c index de729407..8cc48134 100644 --- a/src/geodtest.c +++ b/src/geodtest.c @@ -341,6 +341,7 @@ static int GeodSolve14() { int result = 0; { double minus1 = -1; + /* cppcheck-suppress wrongmathcall */ nan = sqrt(minus1); } geod_init(&g, wgs84_a, wgs84_f); @@ -482,6 +483,7 @@ static int GeodSolve55() { int result = 0; { double minus1 = -1; + /* cppcheck-suppress wrongmathcall */ nan = sqrt(minus1); } geod_init(&g, wgs84_a, wgs84_f); -- cgit v1.2.3