From: Federico G. Schwindt <fgsch@lodoss.net>
Date: Sat, 24 Aug 2013 23:07:06 +0000 (+0100)
Subject: Silence warning
X-Git-Tag: rel-21-rc1~38
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d01be7bbd2bbfd2524384af3cb9bdefaa87ea48;p=ngircd

Silence warning

Cast the result of the operation to long, not the time(NULL) call.
On systems where sizeof(time_t) is other than long this will produce
a warning.
---

diff --git a/src/ngircd/log.c b/src/ngircd/log.c
index 028f4353..18fb6fa3 100644
--- a/src/ngircd/log.c
+++ b/src/ngircd/log.c
@@ -53,7 +53,7 @@ Log_Message(int Level, const char *msg)
 	if (!Is_Daemon) {
 		/* log to console */
 		fprintf(stdout, "[%ld:%d %4ld] %s\n", (long)getpid(), Level,
-				(long)time(NULL) - NGIRCd_Start, msg);
+				(long)(time(NULL) - NGIRCd_Start), msg);
 		fflush(stdout);
 	}
 #ifdef SYSLOG