[gtk+] win32: fix warnings about signed/unsigned mismatch
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: fix warnings about signed/unsigned mismatch
- Date: Fri, 16 Oct 2015 07:23:26 +0000 (UTC)
commit c888a927e7269f119b58c2d1bb19fd44c81a7a67
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Oct 16 09:22:39 2015 +0200
win32: fix warnings about signed/unsigned mismatch
gdk/win32/gdkdevicemanager-win32.c | 15 ++++++++-------
gdk/win32/gdkdnd-win32.c | 2 +-
gdk/win32/gdkkeys-win32.c | 2 +-
gdk/win32/gdkselection-win32.c | 2 +-
4 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index 2ae1ac5..6d59aac 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -382,7 +382,8 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
BOOL active;
DWORD physid;
AXIS axis_x, axis_y, axis_npressure, axis_or[3];
- int i, devix, cursorix, num_axes = 0;
+ UINT devix, cursorix;
+ int i, num_axes = 0;
wchar_t devname[100], csrname[100];
gchar *devname_utf8, *csrname_utf8, *device_name;
BOOL defcontext_done;
@@ -481,7 +482,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
(*p_WTInfoW) (WTI_DEVICES + devix, DVC_NAME, devname);
devname_utf8 = g_utf16_to_utf8 (devname, -1, NULL, NULL, NULL);
#ifdef DEBUG_WINTAB
- GDK_NOTE (INPUT, (g_print("Device %d: %s\n", devix, devname_utf8)));
+ GDK_NOTE (INPUT, (g_print("Device %u: %s\n", devix, devname_utf8)));
#endif
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_NCSRTYPES, &ncsrtypes);
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_FIRSTCSR, &firstcsr);
@@ -525,7 +526,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
lc.lcOutExtY = axis_y.axMax - axis_y.axMin + 1;
lc.lcOutExtY = -lc.lcOutExtY; /* We want Y growing downward */
#if DEBUG_WINTAB
- GDK_NOTE (INPUT, (g_print("context for device %d:\n", devix),
+ GDK_NOTE (INPUT, (g_print("context for device %u:\n", devix),
print_lc(&lc)));
#endif
hctx = g_new (HCTX, 1);
@@ -534,7 +535,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
g_warning ("gdk_input_wintab_init: WTOpen failed");
return;
}
- GDK_NOTE (INPUT, g_print ("opened Wintab device %d %p\n",
+ GDK_NOTE (INPUT, g_print ("opened Wintab device %u %p\n",
devix, *hctx));
wintab_contexts = g_list_append (wintab_contexts, hctx);
@@ -544,7 +545,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
(*p_WTOverlap) (*hctx, TRUE);
#if DEBUG_WINTAB
- GDK_NOTE (INPUT, (g_print("context for device %d after WTOpen:\n", devix),
+ GDK_NOTE (INPUT, (g_print("context for device %u after WTOpen:\n", devix),
print_lc(&lc)));
#endif
/* Increase packet queue size to reduce the risk of lost packets.
@@ -565,7 +566,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
for (cursorix = firstcsr; cursorix < firstcsr + ncsrtypes; cursorix++)
{
#ifdef DEBUG_WINTAB
- GDK_NOTE (INPUT, (g_print("Cursor %d:\n", cursorix), print_cursor (cursorix)));
+ GDK_NOTE (INPUT, (g_print("Cursor %u:\n", cursorix), print_cursor (cursorix)));
#endif
active = FALSE;
(*p_WTInfoA) (WTI_CURSORS + cursorix, CSR_ACTIVE, &active);
@@ -676,7 +677,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
device->last_axis_data = g_new (gint, num_axes);
- GDK_NOTE (INPUT, g_print ("device: (%d) %s axes: %d\n",
+ GDK_NOTE (INPUT, g_print ("device: (%u) %s axes: %d\n",
cursorix,
device_name,
num_axes));
diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c
index e78c336..ca658cc 100644
--- a/gdk/win32/gdkdnd-win32.c
+++ b/gdk/win32/gdkdnd-win32.c
@@ -1043,7 +1043,7 @@ ienumformatetc_next (LPENUMFORMATETC This,
ULONG *nelt)
{
enum_formats *en = (enum_formats *) This;
- int i, n;
+ ULONG i, n;
GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %ld ", This, en->ix, celt));
diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c
index 920081c..b77edb7 100644
--- a/gdk/win32/gdkkeys-win32.c
+++ b/gdk/win32/gdkkeys-win32.c
@@ -618,7 +618,7 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *keymap,
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
{
- gint i;
+ guint i;
g_print ("gdk_keymap_get_entries_for_keyval: %#.04x (%s):",
keyval, gdk_keyval_name (keyval));
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index ba923ce..0f48c7d 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -664,7 +664,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
{
BITMAPV5HEADER *bV5 = (BITMAPV5HEADER *) ((char *) data + sizeof (BITMAPFILEHEADER));
guchar *p;
- int i;
+ guint i;
bV5->bV5Size = sizeof (BITMAPV5HEADER);
bV5->bV5Width = bi->biWidth;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]