]> jfr.im git - solanum.git/commitdiff
Cast time_t to long long when printing
authorMatthew Martin <redacted>
Mon, 27 Jun 2022 17:04:33 +0000 (12:04 -0500)
committerDoug Freed <redacted>
Fri, 1 Jul 2022 07:43:36 +0000 (03:43 -0400)
extensions/m_ojoin.c
include/messages.h
ircd/client.c
librb/src/event.c
modules/core/m_join.c
modules/core/m_mode.c
modules/m_stats.c
modules/m_topic.c

index 3b04a71fbb81f75357710287fb6b98d1445c6c03..38b35d1e5a2b0d18e26a4f6e1b3c634c91a4cfb2 100644 (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();
index 9a58709663388b6a1b62c00084c81bde52c0f81c..4e6b74e0627c8d880c85a6a747522b37ce7d414e 100644 (file)
 #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"
index 3c332bb84c4e2a2085adbaac107a4c58e8a486e2..24738ae016df1e97f9af7f1558849d0b8e8c3153 100644 (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);
index 17589610e5724f4a6c2ed3b432b5a241b02f471d..9f90b972606c7c6ddc5207d05fb9db752646b752 100644 (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);
        }
 }
index 18e9a1ca248e0a1419b3a76b8603b5b3f806c86b..c5cac107b3551d8e8774858866dabe7db598bedc 100644 (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);
index ab054fd80009a6b3eb53b1c04f11a70b0226a597..f78b59f48b70f1ecfe3e8fe7e7b05a5b05e6ab88 100644 (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
        {
index 790472b32f93d3f82b17630f301e0c3b853afec8..50007bb671986cc2de8674970c975346c969cfb9 100644 (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);
index e4e734b2bff341d6cdf23ed182a27de7a768c93e..214e4a94468885162e4e58d81473082a2f4763f0 100644 (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);
                }
        }
 }