[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-365-gb8a90e53e

jonathan at claws-mail.org jonathan at claws-mail.org
Mon Nov 29 08:26:43 CET 2021


The branch, gtk3 has been updated
       via  b8a90e53e6f6615d3217ef0ba5e5a03b8dbc12f6 (commit)
      from  870b417f9b114dbefbadeb65e6f9c08ebc3d7c2a (commit)

Summary of changes:
 configure.ac                                | 2 +-
 src/common/utils.c                          | 2 +-
 src/plugins/libravatar/libravatar_missing.c | 8 ++++----
 src/plugins/rssyl/rssyl_add_item.c          | 2 +-
 src/plugins/rssyl/rssyl_deleted.c           | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit b8a90e53e6f6615d3217ef0ba5e5a03b8dbc12f6
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Nov 20 06:16:48 2021 -0700

    Use CM_TIME_FORMAT instead of casting

diff --git a/configure.ac b/configure.ac
index bb398254e..77a0aca68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,7 +177,7 @@ AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
 
 AC_MSG_CHECKING([for time_t format specifier])
 _gcc_cflags_save=$CFLAGS
-CFLAGS="-Wall -Werror"
+CFLAGS="-Wformat -Werror"
 AC_COMPILE_IFELSE([
 	AC_LANG_PROGRAM([[
 		#include <stdio.h>
diff --git a/src/common/utils.c b/src/common/utils.c
index 5b6f1b98d..326df0d41 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -4350,7 +4350,7 @@ size_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt
 				*curpos++ = '0'+(lt->tm_min % 10);
 				break;
 			case 's':
-				snprintf(subbuf, 64, "%lld", (long long)mktime(lt));
+				snprintf(subbuf, 64, "%" CM_TIME_FORMAT, mktime(lt));
 				len = strlen(subbuf); CHECK_SIZE();
 				strncpy2(curpos, subbuf, buflen - total_done);
 				break;
diff --git a/src/plugins/libravatar/libravatar_missing.c b/src/plugins/libravatar/libravatar_missing.c
index cc024de9a..f42ea6a6c 100644
--- a/src/plugins/libravatar/libravatar_missing.c
+++ b/src/plugins/libravatar/libravatar_missing.c
@@ -37,7 +37,7 @@ GHashTable *missing_load_from_file(const gchar *filename)
 {
 	FILE *file = claws_fopen(filename, "r");
 	time_t t;
-	long long unsigned seen;
+	time_t seen;
 	gchar md5sum[33];
 	GHashTable *table = NULL;
 	int r = 0, a = 0, d = 0;
@@ -57,10 +57,10 @@ GHashTable *missing_load_from_file(const gchar *filename)
 
 	table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
 
-	while ((r = fscanf(file, "%32s %llu\n", md5sum, &seen)) != EOF) {
-		if (t - (time_t)seen <= LIBRAVATAR_MISSING_TIME) {
+	while ((r = fscanf(file, "%32s %" CM_TIME_FORMAT "\n", md5sum, &seen)) != EOF) {
+		if (t - seen <= LIBRAVATAR_MISSING_TIME) {
 			time_t *value = g_malloc0(sizeof(time_t));
-			*value = (time_t)seen;
+			*value = seen;
 			g_hash_table_insert(table, g_strdup(md5sum), value);
 		} else
 			d++;
diff --git a/src/plugins/rssyl/rssyl_add_item.c b/src/plugins/rssyl/rssyl_add_item.c
index bafc817b8..f3b684904 100644
--- a/src/plugins/rssyl/rssyl_add_item.c
+++ b/src/plugins/rssyl/rssyl_add_item.c
@@ -495,7 +495,7 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item)
 		fprintf(f, "X-RSSyl-URL: %s\n", tmpurl);
 
 	if( ritem->last_update > 0) {
-		fprintf(f, "X-RSSyl-Last-Seen: %lld\n", (long long)ritem->last_update);
+		fprintf(f, "X-RSSyl-Last-Seen: %" CM_TIME_FORMAT "\n", ritem->last_update);
 	}
 
 	/* Message-ID */
diff --git a/src/plugins/rssyl/rssyl_deleted.c b/src/plugins/rssyl/rssyl_deleted.c
index 32c0c34a5..dab0a4824 100644
--- a/src/plugins/rssyl/rssyl_deleted.c
+++ b/src/plugins/rssyl/rssyl_deleted.c
@@ -164,9 +164,9 @@ static void _store_one_deleted_item(gpointer data, gpointer user_data)
 	err |= (fprintf(f,
 			"ID: %s\n"
 			"TITLE: %s\n"
-			"DPUB: %lld\n",
+			"DPUB: %" CM_TIME_FORMAT "\n",
 			ditem->id, ditem->title,
-			(long long)ditem->date_published) < 0);
+			ditem->date_published) < 0);
 
 	if (err)
 		debug_print("RSSyl: Error during writing deletion file.\n");

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list