[gimp] plug-ins: fix a type warning.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix a type warning.
- Date: Sat, 21 Sep 2019 16:37:00 +0000 (UTC)
commit 142002446e23c898069df66ce5c919ee5d48659e
Author: Jehan <jehan girinstud io>
Date: Sat Sep 21 18:32:09 2019 +0200
plug-ins: fix a type warning.
When cross-compiling for Windows, I had this warning:
> plug-ins/file-ico/ico-load.c:221:22: warning: format '%lu' expects
> argument of type 'long unsigned int', but argument 5 has type 'long
> long unsigned int' [-Wformat=]
I guess that on some platform sizeof may be a long long uint. Just cast
the result to long uint instead (I could have done the other way around,
but I doubt the struct type IcoFileEntry would ever get bigger than long
uint max!).
plug-ins/file-ico/ico-load.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/file-ico/ico-load.c b/plug-ins/file-ico/ico-load.c
index a12ac60138..4695d8fdef 100644
--- a/plug-ins/file-ico/ico-load.c
+++ b/plug-ins/file-ico/ico-load.c
@@ -219,7 +219,7 @@ ico_read_info (FILE *fp,
{
g_set_error (error, G_FILE_ERROR, 0,
_("Could not read '%lu' bytes"),
- sizeof (IcoFileEntry));
+ (long unsigned int) sizeof (IcoFileEntry));
g_free (entries);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]