diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-30 12:57:26 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-30 12:57:26 +0100 |
commit | 7182c6def360378038c9dc824b7cdf8f3d73a73f (patch) | |
tree | 703298652f45ac063837ae79a313e84abb0b21c0 /runtime/rsconf.c | |
parent | 886ce6653dbc12937fdd80687b167e4323f59ce4 (diff) | |
download | rsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.tar.gz rsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.tar.bz2 rsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.zip |
silence compiler warnings
the changes do not affect actual code execution, just keep the
compile log clean.
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index dcaa1ad9..55fdd3bd 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -292,6 +292,9 @@ getNOW(eNOWType eNow, es_str_t **estr) case NOW_MINUTE: len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "%2.2d", t.minute); break; + default: + len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "*invld eNow*"); + break; } /* now create a string object out of it and hand that over to the var */ @@ -476,6 +479,9 @@ cnfGetVar(char *name, void *usrptr) estr = msgGetCEEVarNew((msg_t*) usrptr, name+2); else estr = msgGetMsgVarNew((msg_t*) usrptr, (uchar*)name+1); + } else { /* if this happens, we have a program logic error */ + estr = es_newStrFromCStr("err: var must start with $", + strlen("err: var must start with $")); } if(Debug) { char *s; |