Fix valgrind warnings in filter tests

This commit is contained in:
Andrew Johnson
2019-07-08 12:55:21 -05:00
parent cac3e2dc3b
commit 84c86e67e8
3 changed files with 6 additions and 0 deletions

View File

@@ -39,12 +39,14 @@ static int fl_equal(const db_field_log *pfl1, const db_field_log *pfl2) {
static void fl_setup(dbChannel *chan, db_field_log *pfl) {
struct dbCommon *prec = dbChannelRecord(chan);
memset(pfl, 0, sizeof(db_field_log));
pfl->ctx = dbfl_context_read;
pfl->type = dbfl_type_val;
pfl->stat = prec->stat;
pfl->sevr = prec->sevr;
pfl->time = prec->time;
pfl->field_type = dbChannelFieldType(chan);
pfl->field_size = dbChannelFieldSize(chan);
pfl->no_elements = dbChannelElements(chan);
/*
* use memcpy to avoid a bus error on

View File

@@ -39,12 +39,14 @@ static int fl_equal(const db_field_log *pfl1, const db_field_log *pfl2) {
static void fl_setup(dbChannel *chan, db_field_log *pfl, long val) {
struct dbCommon *prec = dbChannelRecord(chan);
memset(pfl, 0, sizeof(db_field_log));
pfl->ctx = dbfl_context_event;
pfl->type = dbfl_type_val;
pfl->stat = prec->stat;
pfl->sevr = prec->sevr;
pfl->time = prec->time;
pfl->field_type = DBF_LONG;
pfl->field_size = sizeof(epicsInt32);
pfl->no_elements = 1;
/*
* use memcpy to avoid a bus error on

View File

@@ -42,12 +42,14 @@ static int fl_equal(const db_field_log *pfl1, const db_field_log *pfl2) {
static void fl_setup(dbChannel *chan, db_field_log *pfl, long val) {
struct dbCommon *prec = dbChannelRecord(chan);
memset(pfl, 0, sizeof(db_field_log));
pfl->ctx = dbfl_context_event;
pfl->type = dbfl_type_val;
pfl->stat = prec->stat;
pfl->sevr = prec->sevr;
pfl->time = prec->time;
pfl->field_type = DBF_LONG;
pfl->field_size = sizeof(epicsInt32);
pfl->no_elements = 1;
/*
* use memcpy to avoid a bus error on