
Silence a warning in msg_has_ctrls which gcc in the new version of FreeBSD warns about. Also, gcc now warns about something of type time_t not matching the %ld/%lu used in the format string. Fixed by adding casts to long or unsigned long. --- src/channel.c | 10 ++++++---- src/hide.c | 3 ++- src/m_stats.c | 3 ++- src/s_misc.c | 3 ++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/channel.c b/src/channel.c index 4f3bb07..40c14ae 100644 --- a/src/channel.c +++ b/src/channel.c @@ -104,10 +104,10 @@ msg_has_ctrls(char *msg) { unsigned char *c; - if (msg == NULL) + if (msg == NULL) return 0; - for (c = msg; *c; c++) + for (c = (unsigned char *)msg; *c; c++) { /* not a control code */ if (*c > 31) @@ -3335,7 +3335,8 @@ void send_topic_burst(aClient *cptr) { if(chptr->topic[0] != '\0') sendto_one(cptr, ":%s TOPIC %s %s %ld :%s", me.name, chptr->chname, - chptr->topic_nick, chptr->topic_time, chptr->topic); + chptr->topic_nick, (long)chptr->topic_time, + chptr->topic); } if (!(confopts & FLAGS_SERVHUB) || !(cptr->serv->uflags & ULF_NOBAWAY)) @@ -3451,7 +3452,8 @@ int m_topic(aClient *cptr, aClient *sptr, int parc, char *parv[]) * -wd */ sendto_serv_butone(cptr, ":%s TOPIC %s %s %lu :%s", parv[0], - chptr->chname, chptr->topic_nick, chptr->topic_time, + chptr->chname, chptr->topic_nick, + (unsigned long)chptr->topic_time, chptr->topic); sendto_channel_butserv_me(chptr, sptr, ":%s TOPIC %s :%s", parv[0], chptr->chname, chptr->topic); diff --git a/src/hide.c b/src/hide.c index be49573..1f65d12 100644 --- a/src/hide.c +++ b/src/hide.c @@ -339,7 +339,8 @@ void fakelusers_sendlock(aClient *sptr) if(luserslock_expiretime == -1) sendto_one(sptr, ":%s LUSERSLOCK CANCEL", me.name); else - sendto_one(sptr, ":%s LUSERSLOCK UNTIL %ld", me.name, (time_t) luserslock_expiretime); + sendto_one(sptr, ":%s LUSERSLOCK UNTIL %ld", me.name, + (long)luserslock_expiretime); } u_long diff --git a/src/m_stats.c b/src/m_stats.c index 3d82786..186f9e0 100644 --- a/src/m_stats.c +++ b/src/m_stats.c @@ -419,7 +419,8 @@ tstats(aClient *cptr, char *name) me.name, RPL_STATSDEBUG, name, sp->is_ckr, sp->is_cbr, sp->is_skr, sp->is_sbr); sendto_one(cptr, ":%s %d %s :time connected %lu %lu", - me.name, RPL_STATSDEBUG, name, sp->is_cti, sp->is_sti); + me.name, RPL_STATSDEBUG, name, + (long)sp->is_cti, (long)sp->is_sti); #ifdef FLUD sendto_one(cptr, ":%s %d %s :CTCP Floods Blocked %u", me.name, RPL_STATSDEBUG, name, sp->is_flud); diff --git a/src/s_misc.c b/src/s_misc.c index 04adf46..bf18489 100644 --- a/src/s_misc.c +++ b/src/s_misc.c @@ -676,7 +676,8 @@ exit_client(aClient *cptr, aClient *sptr, aClient *from, char *comment) if (IsServer(sptr)) { sendto_ops("%s was connected for %lu seconds. %lu/%lu " - "sendK/recvK.", sptr->name, timeofday - sptr->firsttime, + "sendK/recvK.", sptr->name, + (long)(timeofday - sptr->firsttime), sptr->sendK, sptr->receiveK); #ifdef USE_SYSLOG syslog(LOG_NOTICE, "%s was connected for %lu seconds. %lu/%lu " -- 1.7.4.1