summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-06-13 21:40:38 +0200
committerMohammed Sadiq <sadiq@sadiqpk.org>2018-06-14 06:37:00 +0530
commiteefd2d6f104973d1461feee0b94dff8af991e145 (patch)
treeceaa7521adc4deb452705db6bc8385125e979437 /gtk/gtkimcontextsimple.h
parentdaf72e2e964b05b5c6ddeaa1f43a0966fd2ec98c (diff)
downloadgtk+-eefd2d6f104973d1461feee0b94dff8af991e145.tar.gz
imcontext: Make size arguments be gsize and not int
Otherwise gcc complains when we use these as arguments to g_new() on 32bit architectures with: ../gtk/gtkcomposetable.c: In function ‘gtk_compose_table_list_add_array’: /usr/include/glib-2.0/glib/gmem.h:217:10: warning: argument 1 range [2147483648, 4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=] __p = g_##func##_n (__n, __s); \ ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gmem.h:279:42: note: in expansion of macro ‘_G_NEW’ #define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0) ^~~~~~ ../gtk/gtkcomposetable.c:851:22: note: in expansion of macro ‘g_new0’ gtk_compose_seqs = g_new0 (guint16, length); ^~~~~~ /usr/include/glib-2.0/glib/gmem.h:96:10: note: in a call to allocation function ‘g_malloc0_n’ declared here gpointer g_malloc0_n (gsize n_blocks, ^~~~~~~~~~~
Diffstat (limited to 'gtk/gtkimcontextsimple.h')
-rw-r--r--gtk/gtkimcontextsimple.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkimcontextsimple.h b/gtk/gtkimcontextsimple.h
index b62cf8c183..a64e950352 100644
--- a/gtk/gtkimcontextsimple.h
+++ b/gtk/gtkimcontextsimple.h
@@ -67,8 +67,8 @@ GtkIMContext *gtk_im_context_simple_new (void);
GDK_AVAILABLE_IN_ALL
void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple,
guint16 *data,
- gint max_seq_len,
- gint n_seqs);
+ gsize max_seq_len,
+ gsize n_seqs);
GDK_AVAILABLE_IN_ALL
void gtk_im_context_simple_add_compose_file (GtkIMContextSimple *context_simple,
const gchar *compose_file);