Module: check_mk
Branch: master
Commit: 516b751294803bb0516a662ac84bd730fd8cd4d9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=516b751294803b…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Nov 9 13:11:26 2015 +0100
No need for __attribute__((unused)) Kung Fu in C++.
---
livestatus/src/Column.h | 5 ++---
livestatus/src/EmptyColumn.cc | 2 +-
livestatus/src/Filter.h | 6 +++---
livestatus/src/GlobalCountersColumn.h | 2 +-
livestatus/src/LogCache.cc | 2 +-
livestatus/src/NullColumn.cc | 2 +-
livestatus/src/OffsetStringHostMacroColumn.cc | 2 +-
livestatus/src/OffsetStringMacroColumn.cc | 2 +-
livestatus/src/Table.h | 2 +-
9 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/livestatus/src/Column.h b/livestatus/src/Column.h
index 6ada555..c594d2a 100644
--- a/livestatus/src/Column.h
+++ b/livestatus/src/Column.h
@@ -54,12 +54,11 @@ public:
virtual ~Column() {}
const char *name() const { return _name.c_str(); }
const char *description() const { return _description.c_str(); }
- virtual std::string valueAsString(void *data __attribute__ ((__unused__)), Query *)
- { return "invalid"; }
+ virtual std::string valueAsString(void *, Query *) { return "invalid"; }
virtual int type() = 0;
virtual void output(void *data, Query *) = 0;
virtual bool mustDelete() { return false; } // true for dynamic Columns to be deleted
after Query
- virtual Filter *createFilter(int opid __attribute__ ((__unused__)), char *value
__attribute__ ((__unused__))) { return 0; }
+ virtual Filter *createFilter(int, char *) { return 0; }
void *shiftPointer(void *data);
void setExtraOffset(int o) { _extra_offset = o; }
};
diff --git a/livestatus/src/EmptyColumn.cc b/livestatus/src/EmptyColumn.cc
index 142d509..ca038ac 100644
--- a/livestatus/src/EmptyColumn.cc
+++ b/livestatus/src/EmptyColumn.cc
@@ -26,7 +26,7 @@
#include "Query.h"
-void EmptyColumn::output(void *data __attribute__ ((__unused__)), Query *query)
+void EmptyColumn::output(void *, Query *query)
{
query->outputString("");
}
diff --git a/livestatus/src/Filter.h b/livestatus/src/Filter.h
index a26d43b..cfd9d2a 100644
--- a/livestatus/src/Filter.h
+++ b/livestatus/src/Filter.h
@@ -54,9 +54,9 @@ public:
void setColumn(Column *c) { _column = c; }
Column *column() { return _column; }
virtual bool accepts(void *data) = 0;
- virtual void *indexFilter(const char *columnname __attribute__ ((__unused__))) {
return 0; }
- virtual void findIntLimits(const char *columnname __attribute__ ((__unused__)), int
*lower __attribute__ ((__unused__)), int *upper __attribute__ ((__unused__))) {}
- virtual bool optimizeBitmask(const char *columnname __attribute__ ((__unused__)),
uint32_t *mask __attribute__ ((__unused__))) { return false; }
+ virtual void *indexFilter(const char *) { return 0; }
+ virtual void findIntLimits(const char *, int *, int *) {}
+ virtual bool optimizeBitmask(const char *, uint32_t *) { return false; }
};
#endif // Filter_h
diff --git a/livestatus/src/GlobalCountersColumn.h
b/livestatus/src/GlobalCountersColumn.h
index 7b618b5..39bec33 100644
--- a/livestatus/src/GlobalCountersColumn.h
+++ b/livestatus/src/GlobalCountersColumn.h
@@ -42,7 +42,7 @@ public:
: Column(name, description, -1), _counter_index(counter_index),
_do_average(do_average) {}
int type() { return _do_average ? COLTYPE_DOUBLE : COLTYPE_INT; }
void output(void *, Query *);
- Filter *createFilter(int operator_id __attribute__ ((__unused__)), char *value
__attribute__ ((__unused__))) { return 0; }
+ Filter *createFilter(int, char *) { return 0; }
};
#endif // GlobalCountersColumn_h
diff --git a/livestatus/src/LogCache.cc b/livestatus/src/LogCache.cc
index 5fb90ec..78fdb69 100644
--- a/livestatus/src/LogCache.cc
+++ b/livestatus/src/LogCache.cc
@@ -213,7 +213,7 @@ void LogCache::dumpLogfiles()
The parameters to this method reflect the current query,
not the messages that just has been loaded.
*/
-void LogCache::handleNewMessage(Logfile *logfile, time_t since __attribute__
((__unused__)), time_t until __attribute__ ((__unused__)), unsigned logclasses)
+void LogCache::handleNewMessage(Logfile *logfile, time_t, time_t, unsigned logclasses)
{
if ( static_cast<unsigned long>(++num_cached_log_messages) <=
_max_cached_messages )
return; // current message count still allowed, everything ok
diff --git a/livestatus/src/NullColumn.cc b/livestatus/src/NullColumn.cc
index d47e515..2ab522c 100644
--- a/livestatus/src/NullColumn.cc
+++ b/livestatus/src/NullColumn.cc
@@ -26,7 +26,7 @@
#include "Query.h"
-void NullColumn::output(void *data __attribute__ ((__unused__)), Query *query)
+void NullColumn::output(void *, Query *query)
{
query->outputNull();
}
diff --git a/livestatus/src/OffsetStringHostMacroColumn.cc
b/livestatus/src/OffsetStringHostMacroColumn.cc
index e9a22b3..ca7c9ca 100644
--- a/livestatus/src/OffsetStringHostMacroColumn.cc
+++ b/livestatus/src/OffsetStringHostMacroColumn.cc
@@ -31,7 +31,7 @@ host *OffsetStringHostMacroColumn::getHost(void *data)
return (host *)data;
}
-service *OffsetStringHostMacroColumn::getService(void *data __attribute__
((__unused__)))
+service *OffsetStringHostMacroColumn::getService(void *)
{
return 0;
}
diff --git a/livestatus/src/OffsetStringMacroColumn.cc
b/livestatus/src/OffsetStringMacroColumn.cc
index 4c879c4..0bfe620 100644
--- a/livestatus/src/OffsetStringMacroColumn.cc
+++ b/livestatus/src/OffsetStringMacroColumn.cc
@@ -74,7 +74,7 @@ void OffsetStringMacroColumn::output(void *data, Query *query)
query->outputString(s.c_str());
}
-Filter *OffsetStringMacroColumn::createFilter(int opid __attribute__ ((__unused__)), char
*value __attribute__ ((__unused__)))
+Filter *OffsetStringMacroColumn::createFilter(int, char *)
{
logger(LG_INFO, "Sorry. No filtering on macro columns implemented yet");
return new AndingFilter(); // always true
diff --git a/livestatus/src/Table.h b/livestatus/src/Table.h
index 7a813a3..0551a65 100644
--- a/livestatus/src/Table.h
+++ b/livestatus/src/Table.h
@@ -53,7 +53,7 @@ public:
virtual const char *name() = 0;
virtual const char *prefixname() { return name(); }
virtual bool isAuthorized(contact *, void *) { return true; }
- virtual void *findObject(char *objectspec __attribute__ ((__unused__))) { return 0; }
// objectspec may be modified while parsing
+ virtual void *findObject(char *) { return 0; } // objectspec may be modified while
parsing
void addColumn(Column *);
bool hasColumn(Column *);
void addDynamicColumn(DynamicColumn *);