pidgin/pidgin

Avoid warnings about abs/labs due to long time_t.

16 months ago, Elliott Sales de Andrade
af68597474ae
Parents 1e72d4cc60ad
Children 9acdbd51e504
Avoid warnings about abs/labs due to long time_t.
--- a/libpurple/protocols/jabber/buddy.c Sun Nov 10 04:17:52 2019 -0500
+++ b/libpurple/protocols/jabber/buddy.c Sun Nov 10 04:19:45 2019 -0500
@@ -752,11 +752,10 @@
now_t += jbr->tz_off;
now = gmtime(&now_t);
- timestamp =
- g_strdup_printf("%s %c%02d%02d", purple_time_format(now),
- jbr->tz_off < 0 ? '-' : '+',
- abs(jbr->tz_off / (60*60)),
- abs((jbr->tz_off % (60*60)) / 60));
+ timestamp = g_strdup_printf("%s %c%02d%02d", purple_time_format(now),
+ jbr->tz_off < 0 ? '-' : '+',
+ abs((int)(jbr->tz_off / (60 * 60))),
+ abs((int)((jbr->tz_off % (60 * 60)) / 60)));
purple_notify_user_info_prepend_pair_plaintext(user_info, _("Local Time"), timestamp);
g_free(timestamp);
}