summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-06 16:05:44 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-06 16:05:44 +0000
commitb571fdc61aa16878226c8aede4d12b0df2c69c23 (patch)
tree17c8356c7fe930ac60d3a2e57ea08cfc33e3b4de
parent96ff31f5bfb75741115bf8586a7691efaa7bd06c (diff)
downloadrsyslog-b571fdc61aa16878226c8aede4d12b0df2c69c23.tar.gz
rsyslog-b571fdc61aa16878226c8aede4d12b0df2c69c23.tar.xz
rsyslog-b571fdc61aa16878226c8aede4d12b0df2c69c23.zip
fixed some compiler warnings under FreeBSD
-rw-r--r--action.c2
-rw-r--r--debug.c8
-rw-r--r--omfwd.c2
-rw-r--r--stream.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/action.c b/action.c
index aa0b2f52..b4ec5651 100644
--- a/action.c
+++ b/action.c
@@ -615,7 +615,7 @@ actionCallAction(action_t *pAction, msg_t *pMsg)
!strcmp(getAPPNAME(pMsg), getAPPNAME(pAction->f_pMsg))) {
pAction->f_prevcount++;
dbgprintf("msg repeated %d times, %ld sec of %d.\n",
- pAction->f_prevcount, time(NULL) - pAction->f_time,
+ pAction->f_prevcount, (long) time(NULL) - pAction->f_time,
repeatinterval[pAction->f_repeatcount]);
/* use current message, so we have the new timestamp (means we need to discard previous one) */
msgDestruct(&pAction->f_pMsg);
diff --git a/debug.c b/debug.c
index 14a11ec6..7e7c8f4e 100644
--- a/debug.c
+++ b/debug.c
@@ -798,8 +798,8 @@ dbgoprint(obj_t *pObj, char *fmt, ...)
if(bWasNL) {
if(bPrintTime) {
clock_gettime(CLOCK_REALTIME, &t);
- if(stddbg != NULL) fprintf(stddbg, "%4.4ld.%9.9ld:", t.tv_sec % 10000, t.tv_nsec);
- if(altdbg != NULL) fprintf(altdbg, "%4.4ld.%9.9ld:", t.tv_sec % 10000, t.tv_nsec);
+ if(stddbg != NULL) fprintf(stddbg, "%4.4ld.%9.9ld:", (long) (t.tv_sec % 10000), t.tv_nsec);
+ if(altdbg != NULL) fprintf(altdbg, "%4.4ld.%9.9ld:", (long) (t.tv_sec % 10000), t.tv_nsec);
}
if(stddbg != NULL) fprintf(stddbg, "%s: ", pszThrdName);
if(altdbg != NULL) fprintf(altdbg, "%s: ", pszThrdName);
@@ -877,8 +877,8 @@ dbgprintf(char *fmt, ...)
if(bWasNL) {
if(bPrintTime) {
clock_gettime(CLOCK_REALTIME, &t);
- if(stddbg != NULL) fprintf(stddbg, "%4.4ld.%9.9ld:", t.tv_sec % 10000, t.tv_nsec);
- if(altdbg != NULL) fprintf(altdbg, "%4.4ld.%9.9ld:", t.tv_sec % 10000, t.tv_nsec);
+ if(stddbg != NULL) fprintf(stddbg, "%4.4ld.%9.9ld:", (long) (t.tv_sec % 10000), t.tv_nsec);
+ if(altdbg != NULL) fprintf(altdbg, "%4.4ld.%9.9ld:", (long) (t.tv_sec % 10000), t.tv_nsec);
}
if(stddbg != NULL) fprintf(stddbg, "%s: ", pszThrdName);
if(altdbg != NULL) fprintf(altdbg, "%s: ", pszThrdName);
diff --git a/omfwd.c b/omfwd.c
index 84f3fdc7..a9fed18c 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -239,7 +239,7 @@ static rsRetVal TCPSendFrame(void *pvData, char *msg, size_t len)
* For the time being, we ignore this...
* rgerhards, 2005-10-25
*/
- dbgprintf("message not completely (tcp)send, ignoring %ld\n", lenSend);
+ dbgprintf("message not completely (tcp)send, ignoring %ld\n", (long) lenSend);
usleep(1000); /* experimental - might be benefitial in this situation */
/* TODO: we need to revisit this code -- rgerhards, 2007-12-28 */
}
diff --git a/stream.c b/stream.c
index 986d246d..6a54b7a6 100644
--- a/stream.c
+++ b/stream.c
@@ -501,7 +501,7 @@ rsRetVal strmFlush(strm_t *pThis)
DEFiRet;
ASSERT(pThis != NULL);
- dbgoprint((obj_t*) pThis, "file %d flush, buflen %ld\n", pThis->fd, pThis->iBufPtr);
+ dbgoprint((obj_t*) pThis, "file %d flush, buflen %ld\n", pThis->fd, (long) pThis->iBufPtr);
if(pThis->tOperationsMode == STREAMMODE_WRITE && pThis->iBufPtr > 0) {
iRet = strmWriteInternal(pThis, pThis->pIOBuf, pThis->iBufPtr);
@@ -526,7 +526,7 @@ static rsRetVal strmSeek(strm_t *pThis, off_t offs)
else
strmFlush(pThis);
int i;
- dbgoprint((obj_t*) pThis, "file %d seek, pos %ld\n", pThis->fd, offs);
+ dbgoprint((obj_t*) pThis, "file %d seek, pos %ld\n", pThis->fd, (long) offs);
i = lseek(pThis->fd, offs, SEEK_SET); // TODO: check error!
pThis->iCurrOffs = offs; /* we are now at *this* offset */
pThis->iBufPtr = 0; /* buffer invalidated */