diff options
author | Benjamin Otte <otte@redhat.com> | 2021-09-24 23:18:15 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-09-24 23:26:45 +0200 |
commit | 659181f74bee50af0a805e6e870fe1cac0321a69 (patch) | |
tree | 9863fc6df0b60b339d23841f63efc61a2249f76e | |
parent | 555993717b3c1bf6215a37404ea29bd40167c7e7 (diff) | |
download | gtk+-659181f74bee50af0a805e6e870fe1cac0321a69.tar.gz |
win32: Fix GTK warnings
-rw-r--r-- | gtk/gtkimcontextime.c | 13 | ||||
-rw-r--r-- | gtk/inspector/general.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c index 8f09cde29d..c5ca85997c 100644 --- a/gtk/gtkimcontextime.c +++ b/gtk/gtkimcontextime.c @@ -684,6 +684,9 @@ gtk_im_context_ime_focus_in (GtkIMContext *context) g_free (utf8str); } break; + default: + g_assert_not_reached (); + break; } /* clean */ @@ -695,8 +698,6 @@ static void gtk_im_context_ime_focus_out (GtkIMContext *context) { GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (context); - HWND hwnd; - HIMC himc; gboolean was_preediting; if (!GDK_IS_SURFACE (context_ime->client_surface)) @@ -975,16 +976,16 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display, get_window_position (context_ime->client_surface, &wx, &wy); /* FIXME! */ { - HWND hwnd; + HWND impl_hwnd; POINT pt; RECT rc; - hwnd = + impl_hwnd = gdk_win32_surface_get_impl_hwnd (context_ime->client_surface); - GetWindowRect (hwnd, &rc); + GetWindowRect (impl_hwnd, &rc); pt.x = wx; pt.y = wy; - ClientToScreen (hwnd, &pt); + ClientToScreen (impl_hwnd, &pt); wx = pt.x - rc.left; wy = pt.y - rc.top; } diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c index ea8e617fa7..852ecc90ee 100644 --- a/gtk/inspector/general.c +++ b/gtk/inspector/general.c @@ -372,10 +372,10 @@ init_gl (GtkInspectorGeneral *gen) char *version; gl_version = epoxy_gl_version (); - version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10, NULL); + version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10); gtk_label_set_text (GTK_LABEL (gen->gl_version), version); g_free (version); - gtk_label_set_text (GTK_LABEL (gen->gl_vendor), glGetString (GL_VENDOR)); + gtk_label_set_text (GTK_LABEL (gen->gl_vendor), (const char *) glGetString (GL_VENDOR)); append_wgl_extension_row (gen, "WGL_EXT_create_context"); append_wgl_extension_row (gen, "WGL_EXT_swap_control"); |