[perl-Glib-Object-Introspection] Fix compiler warnings related to format specifiers



commit 872c96e38a45f023edaa6aed2ca85f100dbf953f
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Mon Dec 2 22:10:56 2013 +0100

    Fix compiler warnings related to format specifiers

 gperl-i11n-invoke-c.c          |    2 +-
 gperl-i11n-invoke-perl.c       |    3 ++-
 gperl-i11n-marshal-array.c     |    2 +-
 gperl-i11n-marshal-interface.c |   10 +++++-----
 gperl-i11n-marshal-struct.c    |    2 +-
 gperl-i11n-union.c             |    3 ++-
 6 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/gperl-i11n-invoke-c.c b/gperl-i11n-invoke-c.c
index a377276..342011c 100644
--- a/gperl-i11n-invoke-c.c
+++ b/gperl-i11n-invoke-c.c
@@ -523,7 +523,7 @@ _handle_automatic_arg (guint pos,
        for (l = invocation_info->array_infos; l != NULL; l = l->next) {
                GPerlI11nArrayInfo *ainfo = l->data;
                if (pos == ainfo->length_pos) {
-                       dwarn ("  setting automatic arg %d (array length) to %d\n",
+                       dwarn ("  setting automatic arg %d (array length) to %"G_GSIZE_FORMAT"\n",
                               pos, ainfo->length);
                        /* FIXME: Is it OK to always use v_size here? */
                        arg->v_size = ainfo->length;
diff --git a/gperl-i11n-invoke-perl.c b/gperl-i11n-invoke-perl.c
index 0fe6ca6..afd7d5d 100644
--- a/gperl-i11n-invoke-perl.c
+++ b/gperl-i11n-invoke-perl.c
@@ -390,7 +390,8 @@ _prepare_perl_invocation_info (GPerlI11nInvocationInfo *iinfo,
                                GIArgInfo *length_arg_info = g_callable_info_get_arg (info, i);
                                GITypeInfo *length_arg_type = g_arg_info_get_type (arg_info);
                                raw_to_arg (args[pos], &iinfo->aux_args[pos], length_arg_type);
-                               dwarn ("  pos %d is array length => %d\n", pos, iinfo->aux_args[pos].v_size);
+                               dwarn ("  pos %d is array length => %"G_GSIZE_FORMAT"\n",
+                                      pos, iinfo->aux_args[pos].v_size);
                                g_base_info_unref (length_arg_type);
                                g_base_info_unref (length_arg_info);
                        }
diff --git a/gperl-i11n-marshal-array.c b/gperl-i11n-marshal-array.c
index 5509486..017cd0d 100644
--- a/gperl-i11n-marshal-array.c
+++ b/gperl-i11n-marshal-array.c
@@ -55,7 +55,7 @@ array_to_sv (GITypeInfo *info,
 
        av = newAV ();
 
-       dwarn ("    C array: pointer %p, length %d, item size %d, "
+       dwarn ("    C array: pointer %p, length %"G_GSSIZE_FORMAT", item size %"G_GSIZE_FORMAT", "
               "param_info %p with type tag %d (%s)\n",
               pointer,
               length,
diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
index c81fbe6..517bfee 100644
--- a/gperl-i11n-marshal-interface.c
+++ b/gperl-i11n-marshal-interface.c
@@ -33,7 +33,7 @@ instance_sv_to_pointer (GICallableInfo *info, SV *sv)
                                                info_type,
                                                sv);
                } else {
-                       dwarn ("    boxed type: %s (%d)\n",
+                       dwarn ("    boxed type: %s (%"G_GSIZE_FORMAT")\n",
                               g_type_name (type), type);
                        pointer = gperl_get_boxed_check (sv, type);
                }
@@ -81,11 +81,11 @@ instance_pointer_to_sv (GICallableInfo *info, gpointer pointer)
                        dwarn ("    unboxed type\n");
                        sv = struct_to_sv (container, info_type, pointer, FALSE);
                } else {
-                       dwarn ("    boxed type: %s (%d)\n",
+                       dwarn ("    boxed type: %s (%"G_GSIZE_FORMAT")\n",
                               g_type_name (type), type);
                        sv = gperl_new_boxed (pointer, type, FALSE);
                }
-               warn ("    -> boxed pointer: %p\n", pointer);
+               dwarn ("    -> boxed pointer: %p\n", pointer);
                break;
            }
 
@@ -246,7 +246,7 @@ sv_to_interface (GIArgInfo * arg_info,
                break;
 
            default:
-               ccroak ("sv_to_interface: Don't know how to handle info type %s (%d)",
+               ccroak ("sv_to_interface: Could not handle info type %s (%d)",
                        g_info_type_to_string (info_type),
                        info_type);
        }
@@ -295,7 +295,7 @@ interface_to_sv (GITypeInfo* info, GIArgument *arg, gboolean own, GPerlI11nInvoc
                        if (own)
                                g_boxed_free (type, arg->v_pointer);
                } else {
-                       dwarn ("    boxed type: %d (%s)\n",
+                       dwarn ("    boxed type: %"G_GSIZE_FORMAT" (%s)\n",
                               type, g_type_name (type));
                        sv = gperl_new_boxed (arg->v_pointer, type, own);
                }
diff --git a/gperl-i11n-marshal-struct.c b/gperl-i11n-marshal-struct.c
index 5f14d0d..e4ff30e 100644
--- a/gperl-i11n-marshal-struct.c
+++ b/gperl-i11n-marshal-struct.c
@@ -139,7 +139,7 @@ sv_to_struct (GITransfer transfer,
                g_assert_not_reached ();
        }
 
-       dwarn ("  size: %d\n", size);
+       dwarn ("  size: %"G_GSIZE_FORMAT"\n", size);
 
        field_transfer = GI_TRANSFER_NOTHING;
        dwarn ("  transfer: %d\n", transfer);
diff --git a/gperl-i11n-union.c b/gperl-i11n-union.c
index 2442144..60d1bbf 100644
--- a/gperl-i11n-union.c
+++ b/gperl-i11n-union.c
@@ -55,7 +55,8 @@ associate_union_members_with_gtype (GIUnionInfo *info, const gchar *package, GTy
 
                type_name = g_base_info_get_name (field_interface);
                full_name = g_strconcat (package, "::", type_name, UNION_MEMBER_TYPE_SUFFIX, NULL);
-               dwarn ("associating %s with GType %d\n", type_name, type);
+               dwarn ("associating %s with GType %"G_GSIZE_FORMAT"\n",
+                      type_name, type);
                sv = get_sv (full_name, GV_ADD);
                sv_setuv (sv, type);
                g_free (full_name);


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