Module: check_mk
Branch: master
Commit: 580ce252e897a9e2835eed3d9f82d234514094ae
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=580ce252e897a9…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Oct 26 10:46:43 2015 +0100
Avoid a warning by making the 2 parts of a hack explicit.
---
livestatus/src/DownCommColumn.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/livestatus/src/DownCommColumn.cc b/livestatus/src/DownCommColumn.cc
index 0a1b0cc..70a40a3 100644
--- a/livestatus/src/DownCommColumn.cc
+++ b/livestatus/src/DownCommColumn.cc
@@ -28,6 +28,7 @@
#include "logger.h"
#include "Query.h"
#include "tables.h"
+#include <stdint.h>
void DownCommColumn::output(void *data, Query *query)
{
@@ -89,8 +90,8 @@ void DownCommColumn::output(void *data, Query *query)
void *DownCommColumn::getNagiosObject(char *name)
{
- unsigned int id = strtoul(name, 0, 10);
- return (void *)id; // Hack. Convert number into pointer.
+ unsigned long id = strtoul(name, 0, 10);
+ return reinterpret_cast<void *>(static_cast<uintptr_t>(id)); // Hack.
Convert number into pointer.
}
bool DownCommColumn::isNagiosMember(void *data, void *member)