talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit c3fc28501b99bddb928f1c046b6ec5c48c7622a4
parent 9f87a4ba41137a5793c870bd1b9bf5181ca2ed27
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun, 20 Jan 2019 19:33:34 +0100

Use G_GSIZE_FORMAT for printing time_t values

Diffstat:
Msrc/matcher.c | 2+-
Msrc/mh.c | 2+-
Msrc/plugins/libravatar/libravatar_missing.c | 6+++---
Msrc/plugins/rssyl/parse822.c | 2+-
Msrc/plugins/rssyl/rssyl_add_item.c | 6+++---
Msrc/plugins/vcalendar/vcal_folder.c | 2+-
Msrc/plugins/vcalendar/vcal_manager.c | 2+-
Msrc/plugins/vcalendar/vcal_meeting_gtk.c | 2+-
8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/matcher.c b/src/matcher.c @@ -952,7 +952,7 @@ static gboolean matcherprop_match(MatcherProp *prop, && prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) { if (ret) { log_print(LOG_DEBUG_FILTERING, - "message date [ %ld ] is after [ %d ]\n", + "message date [ %"G_GSIZE_FORMAT" ] is after [ %d ]\n", info->date_t, prop->value); } else { log_print(LOG_DEBUG_FILTERING, diff --git a/src/mh.c b/src/mh.c @@ -1468,6 +1468,6 @@ static void mh_set_mtime(Folder *folder, FolderItem *item) } item->mtime = s.st_mtime; - debug_print("MH: forced mtime of %s to %ld\n", item->name?item->name:"(null)", item->mtime); + debug_print("MH: forced mtime of %s to %"G_GSIZE_FORMAT"\n", item->name?item->name:"(null)", item->mtime); g_free(path); } diff --git a/src/plugins/libravatar/libravatar_missing.c b/src/plugins/libravatar/libravatar_missing.c @@ -83,7 +83,7 @@ close_exit: static void missing_save_item(gpointer key, gpointer value, gpointer data) { FILE *file = (FILE *)data; - gchar *line = g_strdup_printf("%s %lu\n", (gchar *)key, *(time_t *)value); + gchar *line = g_strdup_printf("%s %"G_GSIZE_FORMAT"\n", (gchar *)key, *(time_t *)value); if (claws_fputs(line, file) < 0) g_warning("error saving missing item"); g_free(line); @@ -138,10 +138,10 @@ void missing_add_md5(GHashTable *table, const gchar *md5) seen = g_malloc0(sizeof(time_t)); *seen = t; g_hash_table_insert(table, g_strdup(md5), seen); - debug_print("New md5 %s added with time %lu\n", md5, t); + debug_print("New md5 %s added with time %"G_GSIZE_FORMAT"\n", md5, t); } else { *seen = t; /* just update */ - debug_print("Updated md5 %s with time %lu\n", md5, t); + debug_print("Updated md5 %s with time %"G_GSIZE_FORMAT"\n", md5, t); } } diff --git a/src/plugins/rssyl/parse822.c b/src/plugins/rssyl/parse822.c @@ -137,7 +137,7 @@ FeedItem *rssyl_parse_folder_item_file(gchar *path) /* Last-Seen timestamp */ if( !strcmp(line[0], "X-RSSyl-Last-Seen") ) { ctx->last_seen = atol(line[1]); - debug_print("RSSyl: got last_seen timestamp %ld\n", ctx->last_seen); + debug_print("RSSyl: got last_seen timestamp %"G_GSIZE_FORMAT"\n", ctx->last_seen); } /* ID */ diff --git a/src/plugins/rssyl/rssyl_add_item.c b/src/plugins/rssyl/rssyl_add_item.c @@ -311,13 +311,13 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item) /* If one of the timestamps is empty, set it to value of the other one. */ if( feed_item_get_date_modified(feed_item) == -1 && feed_item_get_date_published(feed_item) >= 0 ) { - debug_print("RSSyl: setting missing moddate to pubdate %ld\n", + debug_print("RSSyl: setting missing moddate to pubdate %"G_GSIZE_FORMAT"\n", feed_item_get_date_published(feed_item)); feed_item_set_date_modified(feed_item, feed_item_get_date_published(feed_item)); } else if( feed_item_get_date_published(feed_item) == -1 && feed_item_get_date_modified(feed_item) >= 0 ) { - debug_print("RSSyl: setting missing pubdate to modddate %ld\n", + debug_print("RSSyl: setting missing pubdate to modddate %"G_GSIZE_FORMAT"\n", feed_item_get_date_modified(feed_item)); feed_item_set_date_published(feed_item, feed_item_get_date_modified(feed_item)); @@ -325,7 +325,7 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item) feed_item_get_date_published(feed_item) == -1 && feed_item_get_sourcedate(feed_item) >= 0 ) { /* If neither item date is set, use date from source (Atom only). */ - debug_print("RSSyl: setting missing pubdate and moddate to feed source date %ld\n", + debug_print("RSSyl: setting missing pubdate and moddate to feed source date %"G_GSIZE_FORMAT"\n", feed_item_get_sourcedate(feed_item)); feed_item_set_date_modified(feed_item, feed_item_get_sourcedate(feed_item)); diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c @@ -1170,7 +1170,7 @@ static void vcal_set_mtime(Folder *folder, FolderItem *item) } item->mtime = s.st_mtime; - debug_print("VCAL: forced mtime of %s to %ld\n", + debug_print("VCAL: forced mtime of %s to %"G_GSIZE_FORMAT"\n", item->name?item->name:"(null)", item->mtime); g_free(path); } diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c @@ -926,7 +926,7 @@ void vcal_manager_save_event (VCalEvent *event, gboolean export_after) xml_tag_add_attr(tag, xml_attr_new("type", tmp)); g_free(tmp); - tmp = g_strdup_printf("%ld", event->postponed); + tmp = g_strdup_printf("%"G_GSIZE_FORMAT, event->postponed); xml_tag_add_attr(tag, xml_attr_new("postponed", tmp)); g_free(tmp); diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c @@ -1824,7 +1824,7 @@ void multisync_export(void) list = vcal_folder_get_waiting_events(); for (cur = list; cur; cur = cur->next) { VCalEvent *event = (VCalEvent *)cur->data; - file = g_strdup_printf("multisync%ld-%d", + file = g_strdup_printf("multisync%"G_GSIZE_FORMAT"-%d", time(NULL), i); i++;