[Commits] [SCM] claws branch, master, updated. 3.18.0-307-gf2ce6d5c7
jonathan at claws-mail.org
jonathan at claws-mail.org
Fri Dec 31 19:17:05 UTC 2021
The branch, master has been updated
via f2ce6d5c7b8ded30d6a4071d30c796c4f22f0f1b (commit)
from 51dbebb559c8d7220040bf24d0ce9721083d1d34 (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 f2ce6d5c7b8ded30d6a4071d30c796c4f22f0f1b
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 5127dfefd..9106719b7 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 f0ea272ac..17902c706 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