[gtk+/gtk-2-24-win32] win32: Fix some warnings
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24-win32] win32: Fix some warnings
- Date: Wed, 2 Nov 2011 15:51:10 +0000 (UTC)
commit 985fff354da4b33cac1b56009d9081d505511e60
Author: Alexander Larsson <alexl redhat com>
Date: Wed Nov 2 16:49:55 2011 +0100
win32: Fix some warnings
gdk/win32/gdkdisplay-win32.c | 2 ++
gdk/win32/gdkevents-win32.c | 6 +-----
gdk/win32/gdkfont-win32.c | 4 ++++
gdk/win32/gdkgc-win32.c | 2 ++
gdk/win32/gdkinput-win32.c | 3 +++
gdk/win32/gdkwindow-win32.c | 3 ++-
6 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 2611c03..cef6072 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -370,7 +370,9 @@ inner_clipboard_window_procedure (HWND hwnd,
{
int success;
HWND hwndOwner;
+#ifdef G_ENABLE_DEBUG
UINT nFormat = 0;
+#endif
GdkEvent *event;
GdkWindow *owner;
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index fc980f6..1cde4fc 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2057,7 +2057,7 @@ gdk_event_translate (MSG *msg,
GdkWindow *window = NULL;
GdkWindowImplWin32 *impl;
- GdkWindow *orig_window, *new_window, *toplevel;
+ GdkWindow *orig_window, *new_window;
GdkPointerGrabInfo *grab = NULL;
GdkWindow *grab_window = NULL;
@@ -2776,8 +2776,6 @@ gdk_event_translate (MSG *msg,
case WM_MOUSEACTIVATE:
{
- GdkWindow *tmp;
-
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|| !((GdkWindowObject *)window)->accept_focus)
{
@@ -3669,8 +3667,6 @@ gdk_flush (void)
void
gdk_display_sync (GdkDisplay * display)
{
- MSG msg;
-
g_return_if_fail (display == _gdk_display);
GdiFlush ();
diff --git a/gdk/win32/gdkfont-win32.c b/gdk/win32/gdkfont-win32.c
index e58a8d2..9b81ce50 100644
--- a/gdk/win32/gdkfont-win32.c
+++ b/gdk/win32/gdkfont-win32.c
@@ -96,6 +96,7 @@ gdk_font_hash_lookup (GdkFontType type,
}
}
+#ifdef G_ENABLE_DEBUG
static const char *
charset_name (DWORD charset)
{
@@ -122,6 +123,7 @@ charset_name (DWORD charset)
}
return "unknown";
}
+#endif
/* This table classifies Unicode characters according to the Microsoft
* Unicode subset numbering. This is based on the table in "Developing
@@ -366,6 +368,7 @@ static struct {
U_SPECIALS, "Specials" }
};
+#ifdef G_ENABLE_DEBUG
static void
print_unicode_subranges (FONTSIGNATURE *fsp)
{
@@ -387,6 +390,7 @@ print_unicode_subranges (FONTSIGNATURE *fsp)
g_print (" none!");
g_print ("\n");
}
+#endif
static gboolean
check_unicode_subranges (UINT charset,
diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c
index 62f7929..712bc28 100644
--- a/gdk/win32/gdkgc-win32.c
+++ b/gdk/win32/gdkgc-win32.c
@@ -205,7 +205,9 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
GdkGCValuesMask mask,
GdkGCWin32 *win32_gc)
{
+#ifdef G_ENABLE_DEBUG
char *s = "";
+#endif
GDK_NOTE (GC, g_print ("{"));
diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c
index c897a12..3fe7aaf 100644
--- a/gdk/win32/gdkinput-win32.c
+++ b/gdk/win32/gdkinput-win32.c
@@ -97,8 +97,10 @@ gdk_input_find_dev_from_ctx (HCTX hctx,
return NULL;
}
+
#if DEBUG_WINTAB
+#ifdef G_ENABLE_DEBUG
static void
print_lc(LOGCONTEXT *lc)
{
@@ -323,6 +325,7 @@ print_cursor (int index)
}
}
#endif
+#endif
void
_gdk_input_wintab_init_check (void)
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index bef9a1d..867e343 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -965,7 +965,9 @@ adjust_for_gravity_hints (GdkWindow *window,
if (impl->hint_flags & GDK_HINT_WIN_GRAVITY)
{
+#ifdef G_ENABLE_DEBUG
gint orig_x = *x, orig_y = *y;
+#endif
switch (impl->hints.win_gravity)
{
@@ -1029,7 +1031,6 @@ show_window_internal (GdkWindow *window,
{
GdkWindowObject *private;
GdkWindowImplWin32 *window_impl;
- HWND old_active_window;
gboolean focus_on_map = FALSE;
DWORD exstyle;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]