mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 18:40:42 +01:00
Merge pull request #2553 from rgerhards/lgtm-more-modules2
QA: enable even more modules in lgtm.com static analyzer
This commit is contained in:
commit
e2e4e18bd9
@ -13,4 +13,8 @@ extraction:
|
||||
configure:
|
||||
command:
|
||||
- autoreconf -fvi
|
||||
- ./configure --enable-imfile --enable-mysql
|
||||
# We cannot use the following features due to too-old packages:
|
||||
# --enable-mmnormalize --enable-pmnormalize --enable-relp
|
||||
# We need to look more into the following ones:
|
||||
# --enable-mmgrok --enable-omtcl
|
||||
- ./configure --enable-imfile --enable-mysql --enable-usertools --enable-pgsql --enable-libdbi --enable-snmp --enable-elasticsearch --enable-gnutls --enable-mail --enable-imdiag --enable-mmjsonparse --enable-mmaudit --enable-mmanon --enable-mmrm1stspace --enable-mmutf8fix --enable-mmcount --enable-mmdblookup --enable-mmfields --enable-mmpstrucdata --enable-imptcp --enable-impstats --enable-omprog --enable-omudpspoof --enable-omstdout --enable-omjournal --enable-pmlastmsg --enable-pmcisconames --enable-pmciscoios --enable-pmnull --enable-pmaixforwardedfrom --enable-pmsnare --enable-pmpanngfw --enable-omuxsock --enable-omkafka --enable-imkafka --enable-ommongodb --enable-omhiredis --enable-omhttpfs --enable-gssapi-krb5
|
||||
|
||||
3
action.c
3
action.c
@ -183,8 +183,7 @@ typedef struct configSettings_s {
|
||||
} configSettings_t;
|
||||
|
||||
|
||||
configSettings_t cs; /* our current config settings */
|
||||
configSettings_t cs_save; /* our saved (scope!) config settings */
|
||||
static configSettings_t cs; /* our current config settings */
|
||||
|
||||
/* the counter below counts actions created. It is used to obtain unique IDs for the action. They
|
||||
* should not be relied on for any long-term activity (e.g. disk queue names!), but they are nice
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
MODULE_TYPE_OUTPUT
|
||||
MODULE_TYPE_NOKEEP
|
||||
|
||||
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal);
|
||||
|
||||
/* static data */
|
||||
DEFobjCurrIf(errmsg);
|
||||
@ -75,7 +74,6 @@ typedef struct wrkrInstanceData {
|
||||
|
||||
BEGINinitConfVars /* (re)set config variables to default values */
|
||||
CODESTARTinitConfVars
|
||||
resetConfigVariables(NULL, NULL);
|
||||
ENDinitConfVars
|
||||
|
||||
|
||||
@ -315,16 +313,6 @@ CODEqueryEtryPt_STD_OMOD8_QUERIES
|
||||
ENDqueryEtryPt
|
||||
|
||||
|
||||
|
||||
/* Reset config variables for this module to default values.
|
||||
*/
|
||||
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
|
||||
{
|
||||
DEFiRet;
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
|
||||
BEGINmodInit()
|
||||
rsRetVal localRet;
|
||||
rsRetVal (*pomsrGetSupportedTplOpts)(unsigned long *pOpts);
|
||||
@ -355,9 +343,6 @@ CODEmodInit_QueryRegCFSLineHdlr
|
||||
}
|
||||
|
||||
CHKiRet(objUse(errmsg, CORE_COMPONENT));
|
||||
|
||||
CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler,
|
||||
resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
|
||||
ENDmodInit
|
||||
|
||||
/* vi:set ai:
|
||||
|
||||
@ -52,7 +52,6 @@ MODULE_TYPE_OUTPUT
|
||||
MODULE_TYPE_NOKEEP
|
||||
MODULE_CNFNAME("ompgsql")
|
||||
|
||||
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal);
|
||||
|
||||
/* internal structures
|
||||
*/
|
||||
@ -77,11 +76,6 @@ typedef struct wrkrInstanceData {
|
||||
ConnStatusType eLastPgSQLStatus; /* last status from postgres */
|
||||
} wrkrInstanceData_t;
|
||||
|
||||
typedef struct configSettings_s {
|
||||
EMPTY_STRUCT
|
||||
} configSettings_t;
|
||||
static configSettings_t __attribute__((unused)) cs;
|
||||
|
||||
/* action (instance) parameters */
|
||||
static struct cnfparamdescr actpdescr[] = {
|
||||
{ "server", eCmdHdlrGetWord, 1 },
|
||||
@ -108,7 +102,6 @@ static struct cnfparamblk actpblk =
|
||||
|
||||
BEGINinitConfVars /* (re)set config variables to default values */
|
||||
CODESTARTinitConfVars
|
||||
resetConfigVariables(NULL, NULL);
|
||||
ENDinitConfVars
|
||||
|
||||
|
||||
@ -515,13 +508,6 @@ CODEqueryEtryPt_STD_CONF2_OMOD_QUERIES
|
||||
/* CODEqueryEtryPt_TXIF_OMOD_QUERIES currently no TX support! */ /* we support the transactional interface! */
|
||||
ENDqueryEtryPt
|
||||
|
||||
/* Reset config variables for this module to default values. */
|
||||
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
|
||||
{
|
||||
DEFiRet;
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
|
||||
BEGINmodInit()
|
||||
CODESTARTmodInit
|
||||
|
||||
@ -145,9 +145,10 @@ static void formater(struct ofields* fields)
|
||||
{
|
||||
char str[N];
|
||||
time_t rtime;
|
||||
struct tm now;
|
||||
|
||||
rtime = (time_t) (fields->date_r / 1000);
|
||||
strftime (str, N, "%b %d %H:%M:%S", gmtime (&rtime));
|
||||
strftime (str, N, "%b %d %H:%M:%S", gmtime_r (&rtime, &now));
|
||||
printf ("%s %s %s %s\n", str, fields->prog, fields->syslog_tag,
|
||||
fields->msg);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user