source/erf-dag: compiler warnings

Bug: #6667.

Fix compiler warnings for function pointer parameters missing const with --enable-dag
pull/10204/head
Stephen Donnelly 2 years ago committed by Victor Julien
parent 26b81ca007
commit c28cc93e23

@ -118,10 +118,10 @@ static inline TmEcode ProcessErfDagRecords(ErfDagThreadVars *ewtn, uint8_t *top,
uint32_t *pkts_read); uint32_t *pkts_read);
static inline TmEcode ProcessErfDagRecord(ErfDagThreadVars *ewtn, char *prec); static inline TmEcode ProcessErfDagRecord(ErfDagThreadVars *ewtn, char *prec);
TmEcode ReceiveErfDagLoop(ThreadVars *, void *data, void *slot); TmEcode ReceiveErfDagLoop(ThreadVars *, void *data, void *slot);
TmEcode ReceiveErfDagThreadInit(ThreadVars *, void *, void **); TmEcode ReceiveErfDagThreadInit(ThreadVars *, const void *, void **);
void ReceiveErfDagThreadExitStats(ThreadVars *, void *); void ReceiveErfDagThreadExitStats(ThreadVars *, void *);
TmEcode ReceiveErfDagThreadDeinit(ThreadVars *, void *); TmEcode ReceiveErfDagThreadDeinit(ThreadVars *, void *);
TmEcode DecodeErfDagThreadInit(ThreadVars *, void *, void **); TmEcode DecodeErfDagThreadInit(ThreadVars *, const void *, void **);
TmEcode DecodeErfDagThreadDeinit(ThreadVars *tv, void *data); TmEcode DecodeErfDagThreadDeinit(ThreadVars *tv, void *data);
TmEcode DecodeErfDag(ThreadVars *, Packet *, void *); TmEcode DecodeErfDag(ThreadVars *, Packet *, void *);
void ReceiveErfDagCloseStream(int dagfd, int stream); void ReceiveErfDagCloseStream(int dagfd, int stream);
@ -175,8 +175,7 @@ TmModuleDecodeErfDagRegister(void)
* \param data data pointer gets populated with * \param data data pointer gets populated with
* *
*/ */
TmEcode TmEcode ReceiveErfDagThreadInit(ThreadVars *tv, const void *initdata, void **data)
ReceiveErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
{ {
SCEnter(); SCEnter();
int stream_count = 0; int stream_count = 0;
@ -196,14 +195,14 @@ ReceiveErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
*/ */
if (dag_parse_name(initdata, ewtn->dagname, DAGNAME_BUFSIZE, if (dag_parse_name(initdata, ewtn->dagname, DAGNAME_BUFSIZE,
&ewtn->dagstream) < 0) { &ewtn->dagstream) < 0) {
SCLogError("Failed to parse DAG interface: %s", (char *)initdata); SCLogError("Failed to parse DAG interface: %s", (const char *)initdata);
SCFree(ewtn); SCFree(ewtn);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
ewtn->livedev = LiveGetDevice(initdata); ewtn->livedev = LiveGetDevice(initdata);
if (ewtn->livedev == NULL) { 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); SCFree(ewtn);
SCReturnInt(TM_ECODE_FAILED); SCReturnInt(TM_ECODE_FAILED);
} }
@ -612,8 +611,7 @@ DecodeErfDag(ThreadVars *tv, Packet *p, void *data)
SCReturnInt(TM_ECODE_OK); SCReturnInt(TM_ECODE_OK);
} }
TmEcode TmEcode DecodeErfDagThreadInit(ThreadVars *tv, const void *initdata, void **data)
DecodeErfDagThreadInit(ThreadVars *tv, void *initdata, void **data)
{ {
SCEnter(); SCEnter();
DecodeThreadVars *dtv = NULL; DecodeThreadVars *dtv = NULL;

Loading…
Cancel
Save