Remove unused variables (mostly in W32 code)
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 10 Jun 2018 20:51:05 +0000 (20:51 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 10 Jun 2018 21:21:01 +0000 (21:21 +0000)
12 files changed:
gdk/win32/gdkcairocontext-win32.c
gdk/win32/gdkclipboard-win32.c
gdk/win32/gdkclipdrop-win32.c
gdk/win32/gdkdevice-wintab.c
gdk/win32/gdkdrop-win32.c
gdk/win32/gdkevents-win32.c
gdk/win32/gdkhdataoutputstream-win32.c
gdk/win32/gdkscreen-win32.c
gdk/win32/gdksurface-win32.c
gtk/gtkimcontextime.c
gtk/gtkprintoperation-win32.c
gtk/gtkwindow.c

index 5868a270ed1b30f21d8557212ca661766c5c38bc..90ea656b953cb7eeabacb603c23c7c42713c54b9 100644 (file)
@@ -59,7 +59,6 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface,
 {
   if (!IsIconic (GDK_SURFACE_HWND (surface)))
     {
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
       GDK_NOTE (EVENTS, g_print ("Setting window position ... "));
 
       API_CALL (SetWindowPos, (GDK_SURFACE_HWND (surface),
@@ -122,12 +121,9 @@ static cairo_surface_t *
 create_cairo_surface_for_surface (GdkSurface *surface,
                                   int         scale)
 {
-  GdkDisplay *display;
   cairo_surface_t *cairo_surface;
   HDC hdc;
 
-  display = gdk_surface_get_display (surface);
-
   hdc = GetDC (GDK_SURFACE_HWND (surface));
   if (!hdc)
     {
@@ -146,9 +142,7 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context,
                                      cairo_region_t *region)
 {
   GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
-  GdkRectangle clip_box;
   GdkSurface *surface;
-  double sx, sy;
   GdkSurfaceImplWin32 *impl;
   int scale;
   cairo_t *cr;
@@ -244,13 +238,10 @@ gdk_win32_cairo_context_end_frame (GdkDrawContext *draw_context,
   GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
   GdkSurface *surface;
   gint scale;
-  GdkSurfaceImplWin32 *impl;
 
   surface = gdk_draw_context_get_surface (draw_context);
   scale = gdk_surface_get_scale_factor (surface);
 
-  impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
-
   /* The code to resize double-buffered windows immediately
    * before blitting the buffer contents onto them used
    * to be here.
index a5cfe28d962d5a27a1fb92783fbc6ed0051a6113..1405463a682050a9a99f02e8705485cedc7db661 100644 (file)
@@ -149,8 +149,6 @@ gdk_win32_clipboard_claim_remote (GdkWin32Clipboard *cb)
 static void
 gdk_win32_clipboard_finalize (GObject *object)
 {
-  GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (object);
-
   G_OBJECT_CLASS (gdk_win32_clipboard_parent_class)->finalize (object);
 }
 
@@ -224,10 +222,7 @@ gdk_win32_clipboard_read_async (GdkClipboard        *clipboard,
                                 GAsyncReadyCallback  callback,
                                 gpointer             user_data)
 {
-  GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (clipboard);
-  GSList *targets;
   GTask *task;
-  GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
 
   task = g_task_new (clipboard, cancellable, callback, user_data);
   g_task_set_priority (task, io_priority);
index 26757464087dd2d926a6bfa1d86f312fb1aba3e0..e557337b2f6168751b251da9d2979ee10c59e985 100644 (file)
@@ -2787,7 +2787,6 @@ _gdk_win32_transmute_contentformat (const gchar   *from_contentformat,
 static GdkAtom
 convert_clipboard_selection_to_targets_target (GdkSurface *requestor)
 {
-  gint fmt;
   int i;
   int format_count = CountClipboardFormats ();
   GArray *targets = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), format_count);
@@ -3223,9 +3222,8 @@ _gdk_win32_store_clipboard_contentformats (GdkClipboard      *cb,
   GArray *pairs; /* of GdkWin32ContentFormatPair */
   const char * const *mime_types;
   gint n_mime_types;
-  gint i, offset;
+  gint i;
   GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
-  GArray *streams;
   GdkWin32ClipboardStorePrep *prep;
 
   g_assert (clipdrop->clipboard_window != NULL);
index 553d2a3a62c037f3c55f47a65ff1751a85910ddb..3f499d9a00dab2e3a5c785e958f7319df71b40e5 100644 (file)
@@ -119,7 +119,6 @@ gdk_device_wintab_query_state (GdkDevice        *device,
   GdkDeviceWintab *device_wintab;
   POINT point;
   HWND hwnd, hwndc;
-  GdkSurfaceImplWin32 *impl;
   int scale;
 
   device_wintab = GDK_DEVICE_WINTAB (device);
@@ -231,7 +230,6 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
   gint root_x, root_y;
   gdouble temp_x, temp_y;
   gint i;
-  GdkDisplay *display;
 
   device = GDK_DEVICE (device_wintab);
   impl_surface = _gdk_surface_get_impl_surface (window);
@@ -239,8 +237,6 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
 
   gdk_surface_get_origin (impl_surface, &root_x, &root_y);
 
-  display = gdk_device_get_display (device);
-
   for (i = 0; i < gdk_device_get_n_axes (device); i++)
     {
       GdkAxisUse use;
index 5c3018985cb99be64a3b5522bead9caf1885dcec..d9b48fbf55d7342f786612f589163d50380f8fc6 100644 (file)
@@ -526,7 +526,6 @@ idroptarget_drop (LPDROPTARGET This,
 {
   target_drag_context *ctx = (target_drag_context *) This;
   GdkWin32DropContext *context_win32 = GDK_WIN32_DROP_CONTEXT (ctx->context);
-  GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
   gint pt_x = pt.x / context_win32->scale + _gdk_offset_x;
   gint pt_y = pt.y / context_win32->scale + _gdk_offset_y;
 
@@ -895,7 +894,6 @@ gdk_win32_drop_context_drop_finish (GdkDragContext *context,
                  guint32         time)
 {
   GdkDragContext *src_context;
-  GdkEvent *tmp_event;
   GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
 
   g_return_if_fail (context != NULL);
index ac8186c2b09a057e3f132a6ebafe859f2b84eeec..86975b774d10aae311b3562f896bff666ce50de9 100644 (file)
@@ -769,7 +769,6 @@ void
 _gdk_win32_print_event (const GdkEvent *event)
 {
   gchar *escaped, *kvname;
-  const char *selection_name, *target_name, *property_name;
 
   g_print ("%s%*s===> ", (debug_indent > 0 ? "\n" : ""), debug_indent, "");
   switch (event->any.type)
@@ -1029,7 +1028,6 @@ apply_message_filters (GdkDisplay *display,
                        GList     **filters)
 {
   GdkWin32MessageFilterReturn result = GDK_WIN32_MESSAGE_FILTER_CONTINUE;
-  GList *node;
   GList *tmp_list;
 
   tmp_list = *filters;
@@ -1757,13 +1755,10 @@ static void
 handle_dpi_changed (GdkSurface *window,
                     MSG       *msg)
 {
-  HWND hwnd = GDK_SURFACE_HWND (window);
   GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
   GdkDisplay *display = gdk_display_get_default ();
   GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display);
-  GdkDevice *device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
   RECT *rect = (RECT *)msg->lParam;
-  GdkEvent *event;
   guint old_scale = impl->surface_scale;
 
   /* MSDN for WM_DPICHANGED: dpi_x == dpi_y here, so LOWORD (msg->wParam) == HIWORD (msg->wParam) */
@@ -2036,15 +2031,12 @@ handle_wm_sysmenu (GdkSurface *window, MSG *msg, gint *ret_valp)
 {
   GdkSurfaceImplWin32 *impl;
   LONG_PTR style, tmp_style;
-  gboolean maximized, minimized;
   LONG_PTR additional_styles;
 
   impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
 
   style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
 
-  maximized = IsZoomed (msg->hwnd) || (style & WS_MAXIMIZE);
-  minimized = IsIconic (msg->hwnd) || (style & WS_MINIMIZE);
   additional_styles = 0;
 
   if (!(style & WS_SYSMENU))
@@ -2252,17 +2244,12 @@ gdk_event_translate (MSG  *msg,
   GdkSurface *grab_window = NULL;
 
   gint button;
-  GdkAtom target;
 
   gchar buf[256];
   gboolean return_val = FALSE;
 
   int i;
 
-  GdkWin32Clipdrop *clipdrop = NULL;
-
-  STGMEDIUM *property_change_data;
-
   display = gdk_display_get_default ();
   win32_display = GDK_WIN32_DISPLAY (display);
 
index 0a9d35b71b7cbafeeab5c55af5b948e8e5081291..9c46fcc35125ff3b67f934607e8e496087bd8f93 100644 (file)
@@ -341,7 +341,6 @@ gdk_win32_hdata_output_stream_class_init (GdkWin32HDataOutputStreamClass *klass)
 static void
 gdk_win32_hdata_output_stream_init (GdkWin32HDataOutputStream *stream)
 {
-  GdkWin32HDataOutputStreamPrivate *priv = gdk_win32_hdata_output_stream_get_instance_private (stream);
 }
 
 GOutputStream *
index 56e78868038a12f8828d276ea8d4d2be8b3ebb77..94c404c819e432589a0a58edf5d94c22c227cf22 100644 (file)
@@ -51,7 +51,6 @@ init_root_window_size (GdkWin32Screen *screen)
   GdkDisplay *display = _gdk_display;
   int monitor_count;
   GdkMonitor *monitor;
-  GdkSurfaceImplWin32 *root_impl;
 
   monitor_count = gdk_display_get_n_monitors (display);
   monitor = gdk_display_get_monitor (display, 0);
index a1d38da79099cd106398142eff6cafa509447b0b..ee5b413f03cc047f618fb71bebe1f8934e43d01e 100644 (file)
@@ -185,8 +185,6 @@ _gdk_surface_impl_win32_get_type (void)
 static void
 gdk_surface_impl_win32_init (GdkSurfaceImplWin32 *impl)
 {
-  GdkDisplay *display = gdk_display_get_default ();
-
   impl->hicon_big = NULL;
   impl->hicon_small = NULL;
   impl->hint_flags = 0;
@@ -391,7 +389,6 @@ static ATOM
 RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
 {
   static ATOM klassTOPLEVEL   = 0;
-  static ATOM klassCHILD      = 0;
   static ATOM klassTEMP       = 0;
   static ATOM klassTEMPSHADOW = 0;
   static HICON hAppIcon = NULL;
@@ -1337,7 +1334,6 @@ gdk_win32_surface_resize (GdkSurface *window,
   else
     {
       RECT outer_rect;
-      GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
 
       get_outer_rect (window, width, height, &outer_rect);
 
@@ -1881,11 +1877,6 @@ gdk_win32_surface_get_geometry (GdkSurface *window,
                               gint      *width,
                               gint      *height)
 {
-  GdkDisplay *display;
-  gboolean window_is_root;
-
-  display = gdk_surface_get_display (window);
-
   if (!GDK_SURFACE_DESTROYED (window))
     {
       RECT rect;
@@ -3770,7 +3761,6 @@ handle_aerosnap_move_resize (GdkSurface                   *window,
   gint halfright = 0;
   gint fullup = 0;
   gboolean fullup_edge = FALSE;
-  GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
 
   if (context->op == GDK_WIN32_DRAGOP_RESIZE)
     switch (context->edge)
@@ -4024,7 +4014,6 @@ setup_drag_move_resize_context (GdkSurface                   *window,
   const gchar *cursor_name;
   GdkSurface *pointer_window;
   GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
-  GdkDisplay *display = gdk_device_get_display (device);
   gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
 
   /* Before we drag, we need to undo any maximization or snapping.
@@ -5296,7 +5285,6 @@ gdk_win32_surface_get_impl_hwnd (GdkSurface *window)
 static void
 gdk_win32_cairo_surface_destroy (void *data)
 {
-  GdkSurfaceImplWin32 *impl = data;
 }
 
 BOOL WINAPI
@@ -5421,8 +5409,6 @@ _gdk_win32_surface_get_scale_factor (GdkSurface *window)
   GdkSurfaceImplWin32 *impl;
 
   GdkWin32Display *win32_display;
-  UINT dpix, dpiy;
-  gboolean is_scale_acquired;
 
   if (GDK_SURFACE_DESTROYED (window))
     return 1;
index ae382c26ae6a60259ed91b6b9a6211244e465892..706c1e54f222a293f5c44667081f8f6d5e59c7c1 100644 (file)
@@ -1050,7 +1050,6 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
         if (msg->lParam & GCS_RESULTSTR)
           {
             gsize len;
-            gchar *utf8str = NULL;
             GError *error = NULL;
 
             len = ImmGetCompositionStringW (himc, GCS_RESULTSTR, NULL, 0);
index db7247e0e4dd51fdf09b769a01c09e58b1d7120a..ca7c1be125539ba75123861a84830550c7ff5610 100644 (file)
@@ -1402,10 +1402,6 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
        */
       if (message == WM_SIZE)
         {
-          GtkAllocation alloc;
-          alloc.width = LOWORD (lparam);
-          alloc.height = HIWORD (lparam);
-
           gtk_widget_queue_resize (op_win32->embed_widget);
         }
 
index f53aa6855afb7f8cefd2e4e50859e3caa5e1a714..5e5950f056befc69bc5cb0fc7e733b37dfac2899 100644 (file)
@@ -1873,7 +1873,9 @@ gtk_window_init (GtkWindow *window)
   GtkWidget *widget;
   GtkCssNode *widget_node;
   GdkSeat *seat;
+#ifdef GDK_WINDOWING_X11
   GdkContentFormats *targets;
+#endif
 
   widget = GTK_WIDGET (window);