[gimp/gimp-2-10] app: fixes int overflow warning.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: fixes int overflow warning.
- Date: Thu, 6 Feb 2020 23:14:52 +0000 (UTC)
commit af91989eff90519052e73a8cf113bb83d317b478
Author: Jehan <jehan girinstud io>
Date: Wed Dec 25 22:01:33 2019 +0100
app: fixes int overflow warning.
This fixes the following warning when compiling with Mingw:
> warning: integer overflow in expression of type 'long int' results in '-694967296' [-Woverflow]
(cherry picked from commit bb7f229b97e5ef8dd5f5c0b64bfebfdf4867de02)
app/gimp-update.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app/gimp-update.c b/app/gimp-update.c
index 4789a5a302..68d8d56b59 100644
--- a/app/gimp-update.c
+++ b/app/gimp-update.c
@@ -178,7 +178,7 @@ gimp_update_check (GimpCoreConfig *config)
current_timestamp = g_get_real_time();
/* Do not check more than once a week. */
- if (current_timestamp < prev_update_timestamp + G_USEC_PER_SEC * 3600L * 24L * 7L)
+ if (current_timestamp - prev_update_timestamp < (gint64) G_USEC_PER_SEC * 3600L * 24L * 7L)
return FALSE;
gimp_versions = g_file_new_for_uri ("https://testing.gimp.org/gimp_versions.json");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]