Skip to content

Commit

Permalink
source/erf-dag: compiler warnings
Browse files Browse the repository at this point in the history
Bug: OISF#6667.

Fix compiler warnings for function pointer parameters missing const with --enable-dag
  • Loading branch information
sfd committed Jan 10, 2024
1 parent 1dcf69b commit 171bec0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/source-erf-dag.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ static inline TmEcode ProcessErfDagRecords(ErfDagThreadVars *ewtn, uint8_t *top,
uint32_t *pkts_read);
static inline TmEcode ProcessErfDagRecord(ErfDagThreadVars *ewtn, char *prec);
TmEcode ReceiveErfDagLoop(ThreadVars *, void *data, void *slot);
TmEcode ReceiveErfDagThreadInit(ThreadVars *, void *, void **);
TmEcode ReceiveErfDagThreadInit(ThreadVars *, const void *, void **);
void ReceiveErfDagThreadExitStats(ThreadVars *, void *);
TmEcode ReceiveErfDagThreadDeinit(ThreadVars *, void *);
TmEcode DecodeErfDagThreadInit(ThreadVars *, void *, void **);
TmEcode DecodeErfDagThreadInit(ThreadVars *, const void *, void **);
TmEcode DecodeErfDagThreadDeinit(ThreadVars *tv, void *data);
TmEcode DecodeErfDag(ThreadVars *, Packet *, void *);
void ReceiveErfDagCloseStream(int dagfd, int stream);
Expand Down Expand Up @@ -175,8 +175,7 @@ TmModuleDecodeErfDagRegister(void)
* \param data data pointer gets populated with
*
*/
TmEcode
ReceiveErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
TmEcode ReceiveErfDagThreadInit(ThreadVars *tv, const void *initdata, void **data)
{
SCEnter();
int stream_count = 0;
Expand All @@ -196,14 +195,14 @@ ReceiveErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
*/
if (dag_parse_name(initdata, ewtn->dagname, DAGNAME_BUFSIZE,
&ewtn->dagstream) < 0) {
SCLogError("Failed to parse DAG interface: %s", (char *)initdata);
SCLogError("Failed to parse DAG interface: %s", (const char *)initdata);
SCFree(ewtn);
exit(EXIT_FAILURE);
}

ewtn->livedev = LiveGetDevice(initdata);
if (ewtn->livedev == NULL) {
SCLogError("Unable to get %s live device", (char *)initdata);
SCLogError("Unable to get %s live device", (const char *)initdata);
SCFree(ewtn);
SCReturnInt(TM_ECODE_FAILED);
}
Expand Down Expand Up @@ -612,8 +611,7 @@ DecodeErfDag(ThreadVars *tv, Packet *p, void *data)
SCReturnInt(TM_ECODE_OK);
}

TmEcode
DecodeErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
TmEcode DecodeErfDagThreadInit(ThreadVars *tv, const void *initdata, void **data)
{
SCEnter();
DecodeThreadVars *dtv = NULL;
Expand Down

0 comments on commit 171bec0

Please sign in to comment.