Module: check_mk
Branch: master
Commit: dcd3be2e800073f351030de53f2dc39c0661458b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dcd3be2e800073…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 26 15:02:25 2019 +0200
Activate invalidPointerCast again.
Change-Id: Ia463265a325c5ccd660255a6cb7b0267acb22023
---
livestatus/src/Column.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/livestatus/src/Column.h b/livestatus/src/Column.h
index 6dbd829..945e9d4 100644
--- a/livestatus/src/Column.h
+++ b/livestatus/src/Column.h
@@ -42,6 +42,8 @@ class RowRenderer;
template <typename T>
const T *offset_cast(const void *ptr, size_t offset) {
+ // cppcheck is too dumb to see that this is just pointer arithmetic... :-/
+ // cppcheck-suppress invalidPointerCast
return reinterpret_cast<const T *>(reinterpret_cast<const char *>(ptr) +
offset);
}