summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-09-11 09:10:45 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-09-11 09:10:45 +0000
commitdee95717d729f136f8e6bb577927e2645bdf07dc (patch)
treef580c0691755794abb81647fc8e7e4620592806e
parente79199816d67fe2e8a93aedf84dc0b8f7652521b (diff)
downloadrsyslog-dee95717d729f136f8e6bb577927e2645bdf07dc.tar.gz
rsyslog-dee95717d729f136f8e6bb577927e2645bdf07dc.tar.xz
rsyslog-dee95717d729f136f8e6bb577927e2645bdf07dc.zip
cleaned up compiler warnings
-rw-r--r--ChangeLog6
-rw-r--r--cfsysline.c12
-rw-r--r--iminternal.c2
-rw-r--r--linkedlist.c7
-rw-r--r--linkedlist.h2
-rw-r--r--modules.c2
-rw-r--r--omfile.h1
-rw-r--r--omfwd.c5
8 files changed, 26 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 87841d4b..ca504ad3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
---------------------------------------------------------------------------
Version 1.19.6 (rgerhards), 2007-09-??
+- applied patch by varmojfekoj to change signal handling to the new
+ sigaction API set (replacing the depreciated signal() calls and its
+ friends.
+- fixed a bug that in --enable-debug mode caused an assertion when the
+ discard action was used
+- cleaned up compiler warnings
---------------------------------------------------------------------------
Version 1.19.5 (rgerhards), 2007-09-07
- changed part of the CStr interface so that better error tracking
diff --git a/cfsysline.c b/cfsysline.c
index ad575aaa..9b3c703d 100644
--- a/cfsysline.c
+++ b/cfsysline.c
@@ -592,7 +592,7 @@ rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlTy
uchar *pMyCmdName;
DEFiRet;
- iRet = llFind(&llCmdList, (void *) pCmdName, (void**) &pThis);
+ iRet = llFind(&llCmdList, (void *) pCmdName, (void*) &pThis);
if(iRet == RS_RET_NOT_FOUND) {
/* new command */
CHKiRet(cslcConstruct(&pThis, bChainingPermitted));
@@ -648,7 +648,7 @@ rsRetVal processCfSysLineCommand(uchar *pCmdName, uchar **p)
int bWasOnceOK; /* was the result of an handler at least once RS_RET_OK? */
uchar *pOKp = NULL; /* returned conf line pointer when it was OK */
- iRet = llFind(&llCmdList, (void *) pCmdName, (void**) &pCmd);
+ iRet = llFind(&llCmdList, (void *) pCmdName, (void*) &pCmd);
if(iRet == RS_RET_NOT_FOUND) {
logerror("invalid or yet-unknown config file command - have you forgotten to load a module?");
@@ -659,7 +659,7 @@ rsRetVal processCfSysLineCommand(uchar *pCmdName, uchar **p)
llCookieCmdHdlr = NULL;
bWasOnceOK = 0;
- while((iRetLL = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void**)&pCmdHdlr)) == RS_RET_OK) {
+ while((iRetLL = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void*)&pCmdHdlr)) == RS_RET_OK) {
/* for the time being, we ignore errors during handlers. The
* reason is that handlers are independent. An error in one
* handler does not necessarily mean that another one will
@@ -701,11 +701,11 @@ void dbgPrintCfSysLineHandlers(void)
printf("\nSytem Line Configuration Commands:\n");
llCookieCmd = NULL;
- while((iRet = llGetNextElt(&llCmdList, &llCookieCmd, (void**)&pCmd)) == RS_RET_OK) {
- llGetKey(llCookieCmd, (void**) &pKey); /* TODO: using the cookie is NOT clean! */
+ while((iRet = llGetNextElt(&llCmdList, &llCookieCmd, (void*)&pCmd)) == RS_RET_OK) {
+ llGetKey(llCookieCmd, (void*) &pKey); /* TODO: using the cookie is NOT clean! */
printf("\tCommand '%s':\n", pKey);
llCookieCmdHdlr = NULL;
- while((iRet = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void**)&pCmdHdlr)) == RS_RET_OK) {
+ while((iRet = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void*)&pCmdHdlr)) == RS_RET_OK) {
printf("\t\ttype : %d\n", pCmdHdlr->eType);
printf("\t\tpData: 0x%x\n", (unsigned) pCmdHdlr->pData);
printf("\t\tHdlr : 0x%x\n", (unsigned) pCmdHdlr->cslCmdHdlr);
diff --git a/iminternal.c b/iminternal.c
index 9fce41a7..18b31603 100644
--- a/iminternal.c
+++ b/iminternal.c
@@ -128,7 +128,7 @@ rsRetVal iminternalRemoveMsg(int *pPri, msg_t **ppMsg, int *pFlags)
assert(ppMsg != NULL);
assert(pFlags != NULL);
- CHKiRet(llGetNextElt(&llMsgs, &llCookie, (void**) &pThis));
+ CHKiRet(llGetNextElt(&llMsgs, &llCookie, (void*)&pThis));
*pPri = pThis->pri;
*pFlags = pThis->flags;
*ppMsg = pThis->pMsg;
diff --git a/linkedlist.c b/linkedlist.c
index 7ebadf5a..b9239b48 100644
--- a/linkedlist.c
+++ b/linkedlist.c
@@ -169,13 +169,16 @@ rsRetVal llGetNextElt(linkedList_t *pThis, linkedListCookie_t *ppElt, void **ppU
/* return the key of an Elt
+ * rgerhards, 2007-09-11: note that ppDatea is actually a void**,
+ * but I need to make it a void* to avoid lots of compiler warnings.
+ * It will be converted later down in the code.
*/
-rsRetVal llGetKey(llElt_t *pThis, void **ppData)
+rsRetVal llGetKey(llElt_t *pThis, void *ppData)
{
assert(pThis != NULL);
assert(ppData != NULL);
- *ppData = pThis->pKey;
+ *(void**) ppData = pThis->pKey;
return RS_RET_OK;
}
diff --git a/linkedlist.h b/linkedlist.h
index 0b5b36e9..aafbcf88 100644
--- a/linkedlist.h
+++ b/linkedlist.h
@@ -58,7 +58,7 @@ rsRetVal llDestroyRootElt(linkedList_t *pThis);
rsRetVal llGetNextElt(linkedList_t *pThis, linkedListCookie_t *ppElt, void **ppUsr);
rsRetVal llAppend(linkedList_t *pThis, void *pKey, void *pData);
rsRetVal llFind(linkedList_t *pThis, void *pKey, void **ppData);
-rsRetVal llGetKey(llElt_t *pThis, void **ppData);
+rsRetVal llGetKey(llElt_t *pThis, void *ppData);
rsRetVal llGetNumElts(linkedList_t *pThis, int *piCnt);
rsRetVal llExecFunc(linkedList_t *pThis, rsRetVal (*pFunc)(void*, void*), void* pParam);
/* use the macro below to define a function that will be executed by
diff --git a/modules.c b/modules.c
index b17f7982..11aad034 100644
--- a/modules.c
+++ b/modules.c
@@ -32,6 +32,8 @@
#include <assert.h>
#include <errno.h>
+#include <dlfcn.h> /* TODO: replace this with the libtools equivalent! */
+
#include <unistd.h>
#include <sys/file.h>
diff --git a/omfile.h b/omfile.h
index 5352704a..2f02d9cc 100644
--- a/omfile.h
+++ b/omfile.h
@@ -26,7 +26,6 @@
/* prototypes */
rsRetVal modInitFile(int iIFVersRequested __attribute__((unused)), int *ipIFVersProvided, rsRetVal (**pQueryEtryPt)(), rsRetVal (*pHostQueryEtryPt)(uchar*, rsRetVal (**)()));
-rsRetVal setDynaFileCacheSize(void __attribute__((unused)) *pVal, int iNewVal); // TODO: remove me after testing!
#endif /* #ifndef OMFILE_H_INCLUDED */
/*
diff --git a/omfwd.c b/omfwd.c
index 3bfd9cc7..b7a7b025 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -569,6 +569,11 @@ static rsRetVal doTryResume(instanceData *pData)
iRet = RS_RET_SUSPENDED;
}
break;
+ case eDestFORW:
+ /* rgerhards, 2007-09-11: this can not happen, but I've included it to
+ * a) make the compiler happy, b) detect any logic errors */
+ assert(0);
+ break;
}
return iRet;