Module: check_mk
Branch: master
Commit: 56d52b7a126469215848e81706dcef1ecf3b887b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=56d52b7a126469…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 26 14:30:27 2019 +0200
Activate containerOutOfBoundsIndexExpression again.
Change-Id: I86711d62e4a51d9834a68d9d860ebcbe7a73a2b7
---
livestatus/src/RendererJSON.cc | 4 ++++
livestatus/src/RendererPython.cc | 2 ++
livestatus/src/RendererPython3.cc | 2 ++
livestatus/src/cppcheck-suppressions.txt | 1 -
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/RendererJSON.cc b/livestatus/src/RendererJSON.cc
index d1563f5..cc9f963 100644
--- a/livestatus/src/RendererJSON.cc
+++ b/livestatus/src/RendererJSON.cc
@@ -68,9 +68,13 @@ void RendererJSON::endDict() { _os << "}"; }
void RendererJSON::outputNull() { _os << "null"; }
void RendererJSON::outputBlob(const std::vector<char> &value) {
+ // cppcheck is too dumb to see that we just take the address... :-/
+ // cppcheck-suppress containerOutOfBoundsIndexExpression
outputUnicodeString("", &value[0], &value[value.size()],
Encoding::latin1);
}
void RendererJSON::outputString(const std::string &value) {
+ // cppcheck is too dumb to see that we just take the address... :-/
+ // cppcheck-suppress containerOutOfBoundsIndexExpression
outputUnicodeString("", &value[0], &value[value.size()],
_data_encoding);
}
diff --git a/livestatus/src/RendererPython.cc b/livestatus/src/RendererPython.cc
index 4737ae6..18b991b 100644
--- a/livestatus/src/RendererPython.cc
+++ b/livestatus/src/RendererPython.cc
@@ -72,5 +72,7 @@ void RendererPython::outputBlob(const std::vector<char>
&value) {
}
void RendererPython::outputString(const std::string &value) {
+ // cppcheck is too dumb to see that we just take the address... :-/
+ // cppcheck-suppress containerOutOfBoundsIndexExpression
outputUnicodeString("u", &value[0], &value[value.size()],
_data_encoding);
}
diff --git a/livestatus/src/RendererPython3.cc b/livestatus/src/RendererPython3.cc
index 80f48f2..33012fc 100644
--- a/livestatus/src/RendererPython3.cc
+++ b/livestatus/src/RendererPython3.cc
@@ -72,5 +72,7 @@ void RendererPython3::outputBlob(const std::vector<char>
&value) {
}
void RendererPython3::outputString(const std::string &value) {
+ // cppcheck is too dumb to see that we just take the address... :-/
+ // cppcheck-suppress containerOutOfBoundsIndexExpression
outputUnicodeString("", &value[0], &value[value.size()],
_data_encoding);
}
diff --git a/livestatus/src/cppcheck-suppressions.txt
b/livestatus/src/cppcheck-suppressions.txt
index fcc3d7a..3aaa5b2 100644
--- a/livestatus/src/cppcheck-suppressions.txt
+++ b/livestatus/src/cppcheck-suppressions.txt
@@ -1,4 +1,3 @@
-containerOutOfBoundsIndexExpression
missingIncludeSystem
missingOverride
noConstructor