Cast time_t to long long when printing

This commit is contained in:
Matthew Martin 2022-06-27 12:04:33 -05:00 committed by Doug Freed
parent 12cee8ab78
commit 5c01fc8bd7
8 changed files with 14 additions and 14 deletions

View file

@ -134,7 +134,7 @@ mo_ojoin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
sendto_one(source_p, form_str(RPL_TOPIC), me.name,
source_p->name, chptr->chname, chptr->topic);
sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
source_p->name, chptr->chname, chptr->topic_info, chptr->topic_time);
source_p->name, chptr->chname, chptr->topic_info, (long long)chptr->topic_time);
}
source_p->localClient->last_join_time = rb_current_time();

View file

@ -101,11 +101,11 @@
#define NUMERIC_STR_323 ":%s 323 %s :End of /LIST"
#define NUMERIC_STR_324 ":%s 324 %s %s %s"
#define NUMERIC_STR_325 ":%s 325 %s %s %s :is the current channel mode-lock"
#define NUMERIC_STR_329 ":%s 329 %s %s %lu"
#define NUMERIC_STR_329 ":%s 329 %s %s %lld"
#define NUMERIC_STR_330 "%s %s :is logged in as"
#define NUMERIC_STR_331 ":%s 331 %s %s :No topic is set."
#define NUMERIC_STR_332 ":%s 332 %s %s :%s"
#define NUMERIC_STR_333 ":%s 333 %s %s %s %lu"
#define NUMERIC_STR_333 ":%s 333 %s %s %s %lld"
#define NUMERIC_STR_337 "%s :%s"
#define NUMERIC_STR_338 "%s %s :actually using host"
#define NUMERIC_STR_341 ":%s 341 %s %s %s"

View file

@ -1573,11 +1573,11 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien
remove_dependents(client_p, source_p, from, IsPerson(from) ? newcomment : comment, comment1);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s was connected"
" for %ld seconds. %d/%d sendK/recvK.",
source_p->name, (long) rb_current_time() - source_p->localClient->firsttime, sendk, recvk);
" for %lld seconds. %d/%d sendK/recvK.",
source_p->name, (long long)(rb_current_time() - source_p->localClient->firsttime), sendk, recvk);
ilog(L_SERVER, "%s was connected for %ld seconds. %d/%d sendK/recvK.",
source_p->name, (long) rb_current_time() - source_p->localClient->firsttime, sendk, recvk);
ilog(L_SERVER, "%s was connected for %lld seconds. %d/%d sendK/recvK.",
source_p->name, (long long)(rb_current_time() - source_p->localClient->firsttime), sendk, recvk);
if(has_id(source_p))
del_from_id_hash(source_p->id, source_p);

View file

@ -307,8 +307,8 @@ rb_dump_events(void (*func) (char *, void *), void *ptr)
RB_DLINK_FOREACH(dptr, event_list.head)
{
ev = dptr->data;
snprintf(buf, sizeof buf, "%-28s %-4ld seconds (frequency=%d)", ev->name,
ev->when - (long)rb_current_time(), (int)ev->frequency);
snprintf(buf, sizeof buf, "%-28s %-4lld seconds (frequency=%d)", ev->name,
(long long)(ev->when - rb_current_time()), (int)ev->frequency);
func(buf, ptr);
}
}

View file

@ -374,7 +374,7 @@ m_join(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
me.name, source_p->name, chptr->chname,
chptr->topic_info,
(unsigned long)chptr->topic_time);
(long long)chptr->topic_time);
}
channel_member_names(chptr, source_p, 1);

View file

@ -132,7 +132,7 @@ m_mode(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
operspy ? channel_modes(chptr, &me) : channel_modes(chptr, source_p));
sendto_one(source_p, form_str(RPL_CREATIONTIME),
me.name, source_p->name, parv[1], chptr->channelts);
me.name, source_p->name, parv[1], (long long)chptr->channelts);
}
else
{

View file

@ -960,8 +960,8 @@ stats_usage (struct Client *source_p)
(int) (rus.ru_stime.tv_sec % 60));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :RSS %ld ShMem %ld Data %ld Stack %ld",
rus.ru_maxrss, (rus.ru_ixrss / rup),
(rus.ru_idrss / rup), (rus.ru_isrss / rup));
rus.ru_maxrss, (long)(rus.ru_ixrss / rup),
(long)(rus.ru_idrss / rup), (long)(rus.ru_isrss / rup));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :Swaps %d Reclaims %d Faults %d",
(int) rus.ru_nswap, (int) rus.ru_minflt, (int) rus.ru_majflt);

View file

@ -173,7 +173,7 @@ m_topic(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
sendto_one(source_p, form_str(RPL_TOPICWHOTIME),
me.name, source_p->name, chptr->chname,
chptr->topic_info,
(unsigned long)chptr->topic_time);
(long long)chptr->topic_time);
}
}
}