mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-06-19 17:32:56 +02:00
fix or work around some more gcc 8 "issues"
This commit is contained in:
parent
0e6d874669
commit
a08387a699
@ -128,7 +128,7 @@ dynstats_addBucketMetrics(dynstats_buckets_t *bkts, dynstats_bucket_t *b, const
|
||||
name_len = ustrlen(name);
|
||||
CHKmalloc(metric_name_buff = malloc((name_len + DYNSTATS_MAX_BUCKET_NS_METRIC_LENGTH + 1) * sizeof(uchar)));
|
||||
|
||||
ustrncpy(metric_name_buff, name, name_len);
|
||||
strcpy((char*)metric_name_buff, (char*)name);
|
||||
metric_suffix = metric_name_buff + name_len;
|
||||
*metric_suffix = DYNSTATS_METRIC_NAME_SEPARATOR;
|
||||
metric_suffix++;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* lookup.c
|
||||
* Support for lookup tables in RainerScript.
|
||||
*
|
||||
* Copyright 2013-2017 Adiscon GmbH.
|
||||
* Copyright 2013-2018 Adiscon GmbH.
|
||||
*
|
||||
* This file is part of the rsyslog runtime library.
|
||||
*
|
||||
|
||||
@ -74,6 +74,9 @@ DEFobjCurrIf(strm)
|
||||
DEFobjCurrIf(datetime)
|
||||
DEFobjCurrIf(statsobj)
|
||||
|
||||
#if __GNUC__ >= 8
|
||||
#pragma GCC diagnostic ignored "-Wcast-function-type" // TODO: investigate further!
|
||||
#endif /* if __GNUC__ >= 8 */
|
||||
|
||||
#ifdef ENABLE_IMDIAG
|
||||
unsigned int iOverallQueueSize = 0;
|
||||
@ -3314,7 +3317,7 @@ finalize_it:
|
||||
#undef isProp
|
||||
|
||||
/* dummy */
|
||||
static rsRetVal qqueueQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal qqueueQueryInterface(interface_t __attribute__((unused)) *i) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
|
||||
/* Initialize the stream class. Must be called as the very first method
|
||||
* before anything else is called inside this class.
|
||||
@ -3330,6 +3333,3 @@ BEGINObjClassInit(qqueue, 1, OBJ_IS_CORE_MODULE)
|
||||
/* now set our own handlers */
|
||||
OBJSetMethodHandler(objMethod_SETPROPERTY, qqueueSetProperty);
|
||||
ENDObjClassInit(qqueue)
|
||||
|
||||
/* vi:set ai:
|
||||
*/
|
||||
|
||||
@ -486,7 +486,7 @@ wtiGetDummy(void)
|
||||
}
|
||||
|
||||
/* dummy */
|
||||
static rsRetVal wtiQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal wtiQueryInterface(interface_t __attribute__((unused)) *i) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
|
||||
/* exit our class
|
||||
*/
|
||||
|
||||
@ -84,7 +84,14 @@ wtpGetDbgHdr(wtp_t *pThis)
|
||||
|
||||
|
||||
/* Not implemented dummy function for constructor */
|
||||
static rsRetVal NotImplementedDummy(void) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal NotImplementedDummy_voidp_int(__attribute__((unused)) void* p1, __attribute__((unused)) int p2) {
|
||||
return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal NotImplementedDummy_voidp_intp(__attribute__((unused)) void* p1, __attribute__((unused)) int* p2) {
|
||||
return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal NotImplementedDummy_voidp_voidp(__attribute__((unused)) void* p1, __attribute__((unused)) void* p2) {
|
||||
return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal NotImplementedDummy_voidp_wti_tp(__attribute__((unused)) void* p1, __attribute__((unused)) wti_t* p2) {
|
||||
return RS_RET_NOT_IMPLEMENTED; }
|
||||
/* Standard-Constructor for the wtp object
|
||||
*/
|
||||
BEGINobjConstruct(wtp) /* be sure to specify the object type also in END macro! */
|
||||
@ -100,10 +107,10 @@ BEGINobjConstruct(wtp) /* be sure to specify the object type also in END macro!
|
||||
#endif
|
||||
pthread_attr_setdetachstate(&pThis->attrThrd, PTHREAD_CREATE_DETACHED);
|
||||
/* set all function pointers to "not implemented" dummy so that we can safely call them */
|
||||
pThis->pfChkStopWrkr = (rsRetVal (*)(void*,int))NotImplementedDummy;
|
||||
pThis->pfGetDeqBatchSize = (rsRetVal (*)(void*,int*))NotImplementedDummy;
|
||||
pThis->pfDoWork = (rsRetVal (*)(void*,void*))NotImplementedDummy;
|
||||
pThis->pfObjProcessed = (rsRetVal (*)(void*,wti_t*))NotImplementedDummy;
|
||||
pThis->pfChkStopWrkr = (rsRetVal (*)(void*,int))NotImplementedDummy_voidp_int;
|
||||
pThis->pfGetDeqBatchSize = (rsRetVal (*)(void*,int*))NotImplementedDummy_voidp_intp;
|
||||
pThis->pfDoWork = (rsRetVal (*)(void*,void*))NotImplementedDummy_voidp_voidp;
|
||||
pThis->pfObjProcessed = (rsRetVal (*)(void*,wti_t*))NotImplementedDummy_voidp_wti_tp;
|
||||
INIT_ATOMIC_HELPER_MUT(pThis->mutCurNumWrkThrd);
|
||||
INIT_ATOMIC_HELPER_MUT(pThis->mutWtpState);
|
||||
ENDobjConstruct(wtp)
|
||||
@ -579,7 +586,7 @@ finalize_it:
|
||||
}
|
||||
|
||||
/* dummy */
|
||||
static rsRetVal wtpQueryInterface(void) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
static rsRetVal wtpQueryInterface(interface_t __attribute__((unused)) *i) { return RS_RET_NOT_IMPLEMENTED; }
|
||||
|
||||
/* exit our class
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user