Skip to content

Commit

Permalink
ts filter: fix unused variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
exzombie committed May 19, 2022
1 parent 6df68d1 commit 14389ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/database/src/std/filters/ts.c
Expand Up @@ -267,6 +267,8 @@ static void ts_string(tsPrivate const *settings, db_field_log *pfl) {
}

static db_field_log *filter(void *pvt, dbChannel *chan, db_field_log *pfl) {
(void)chan;

tsPrivate *settings = (tsPrivate *)pvt;

switch (settings->mode) {
Expand Down Expand Up @@ -294,6 +296,10 @@ static db_field_log *filter(void *pvt, dbChannel *chan, db_field_log *pfl) {
static void channelRegisterPre(dbChannel * chan, void *pvt,
chPostEventFunc **cb_out, void **arg_out,
db_field_log *probe) {
(void)chan;
(void)arg_out;
(void)probe;

tsPrivate *settings = (tsPrivate *)pvt;
*cb_out = settings->mode == tsModeGenerate ? generate : NULL;
}
Expand All @@ -303,6 +309,8 @@ static void channelRegisterPre(dbChannel * chan, void *pvt,
static void channelRegisterPost(dbChannel *chan, void *pvt,
chPostEventFunc **cb_out, void **arg_out,
db_field_log *probe) {
(void)chan;

tsPrivate *settings = (tsPrivate *)pvt;

if (settings->mode == tsModeGenerate || settings->mode == tsModeInvalid) {
Expand Down Expand Up @@ -347,6 +355,9 @@ static void channelRegisterPost(dbChannel *chan, void *pvt,

static void channel_report(dbChannel *chan, void *pvt, int level, const unsigned short indent)
{
(void)chan;
(void)level;

tsPrivate *settings = (tsPrivate *)pvt;
printf("%*sTimestamp (ts): mode: %d, epoch: %d, str: %d\n",
indent, "", settings->mode, settings->epoch, settings->str);
Expand Down

0 comments on commit 14389ac

Please sign in to comment.