Module: check_mk
Branch: master
Commit: 407b7999ee04f74ab4562522a2470a1b3d8d4a5d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=407b7999ee04f7…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 26 08:59:31 2019 +0200
Suppress false positives from cppcheck.
Change-Id: I5a997d00eb81122cf22b67da797317557f7db206
---
livestatus/src/TableHostsByGroup.cc | 2 ++
livestatus/src/TableServicesByGroup.cc | 2 ++
livestatus/src/TableServicesByHostGroup.cc | 2 ++
3 files changed, 6 insertions(+)
diff --git a/livestatus/src/TableHostsByGroup.cc b/livestatus/src/TableHostsByGroup.cc
index 8e10ee6..9b7a0e3 100644
--- a/livestatus/src/TableHostsByGroup.cc
+++ b/livestatus/src/TableHostsByGroup.cc
@@ -37,6 +37,8 @@ extern hostgroup *hostgroup_list;
namespace {
struct hostbygroup {
host _host;
+ // cppcheck is too dumb to see usage in the DANGEROUS_OFFSETOF macro
+ // cppcheck-suppress unusedStructMember
hostgroup *_hostgroup;
};
} // namespace
diff --git a/livestatus/src/TableServicesByGroup.cc
b/livestatus/src/TableServicesByGroup.cc
index eb96b1e..55062c6 100644
--- a/livestatus/src/TableServicesByGroup.cc
+++ b/livestatus/src/TableServicesByGroup.cc
@@ -36,6 +36,8 @@ extern servicegroup *servicegroup_list;
namespace {
struct servicebygroup {
service _service;
+ // cppcheck is too dumb to see usage in the DANGEROUS_OFFSETOF macro
+ // cppcheck-suppress unusedStructMember
servicegroup *_servicegroup;
};
} // namespace
diff --git a/livestatus/src/TableServicesByHostGroup.cc
b/livestatus/src/TableServicesByHostGroup.cc
index 5aff696..97887bd 100644
--- a/livestatus/src/TableServicesByHostGroup.cc
+++ b/livestatus/src/TableServicesByHostGroup.cc
@@ -35,6 +35,8 @@ extern hostgroup *hostgroup_list;
namespace {
struct servicebyhostgroup {
service _service;
+ // cppcheck is too dumb to see usage in the DANGEROUS_OFFSETOF macro
+ // cppcheck-suppress unusedStructMember
hostgroup *_hostgroup;
};
} // namespace