[gimp] app: fixes string format argument types on Windows 32-bit.



commit 7e7d48a7ac4ce8f4549224555cad05cabaeb698f
Author: Jehan <jehan girinstud io>
Date:   Tue Apr 21 14:11:49 2020 +0200

    app: fixes string format argument types on Windows 32-bit.
    
    On 64-bit, all seems fine, but when building to 32-bit (at least Windows
    32-bit), G_GUINT64_FORMAT is defined to "%llu" while time_t is a long
    int. So it doesn't match and the compiler complains:
    
    > warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 
'time_t' {aka 'long int'}
    
    Let's cast to (guint64) to make sure the type always match.

 app/signals.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app/signals.c b/app/signals.c
index 8381b08c6f..92fd266d81 100644
--- a/app/signals.c
+++ b/app/signals.c
@@ -68,7 +68,7 @@ gimp_init_signal_handlers (gchar **backtrace_file)
 
   time (&t);
   filename = g_strdup_printf ("%s-crash-%" G_GUINT64_FORMAT ".txt",
-                              PACKAGE_NAME, t);
+                              PACKAGE_NAME, (guint64) t);
   *backtrace_file = g_build_filename (dir, filename, NULL);
   g_free (filename);
   g_free (dir);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]