aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/cppcheck.sh4
-rw-r--r--src/apps/projsync.cpp2
-rw-r--r--src/projections/isea.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh
index f42d5f6d..1cfd61b5 100755
--- a/scripts/cppcheck.sh
+++ b/scripts/cppcheck.sh
@@ -43,6 +43,10 @@ grep -v "unmatchedSuppression" ${LOG_FILE} \
| grep -v "passedByValue,Function parameter 'xyz' should be passed by const reference" \
| grep -v "passedByValue,Function parameter 'in' should be passed by const reference" \
| grep -v "knownConditionTrueFalse,Condition '!allowEmptyIntersection' is always false" \
+ | grep -v -e "unitconvert.*unreadVariable,Variable 'point.*' is assigned a value that is never used" \
+ | grep -v -e "helmert.*unreadVariable,Variable 'point.*' is assigned a value that is never used" \
+ | grep -v -e "molodensky.*unreadVariable,Variable 'point.*' is assigned a value that is never used" \
+ | grep -v -e "vgridshift.*unreadVariable,Variable 'point.*' is assigned a value that is never used" \
> ${LOG_FILE}.tmp
mv ${LOG_FILE}.tmp ${LOG_FILE}
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/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;