mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
gdk/win32: fix hr
set but not used
A number of warnings are produced: [23/1038] Compiling C object gdk/win32/libgdk-win32.a.p/gdkinput-dmanipulation.c.obj ../gdk/win32/gdkinput-dmanipulation.c: In function 'reset_viewport': ../gdk/win32/gdkinput-dmanipulation.c:354:11: warning: variable 'hr' set but not used [-Wunused-but-set-variable] 354 | HRESULT hr; | ^~ Try to do something sensible instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
d8ead56b9c
commit
5b69df96fe
@ -354,12 +354,13 @@ reset_viewport (IDirectManipulationViewport *viewport)
|
||||
HRESULT hr;
|
||||
|
||||
hr = IDirectManipulationViewport_GetPrimaryContent (viewport, iid, (void**)&content);
|
||||
HR_CHECK (hr);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
hr = IDirectManipulationContent_SyncContentTransform (content, identity,
|
||||
G_N_ELEMENTS (identity));
|
||||
HR_CHECK (hr);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
failed:
|
||||
IUnknown_Release (content);
|
||||
}
|
||||
|
||||
@ -384,7 +385,7 @@ create_viewport (GdkSurface *surface,
|
||||
{
|
||||
DIRECTMANIPULATION_CONFIGURATION configuration = 0;
|
||||
HWND hwnd = GDK_SURFACE_HWND (surface);
|
||||
IDirectManipulationViewportEventHandler *handler;
|
||||
IDirectManipulationViewportEventHandler *handler = NULL;
|
||||
DWORD cookie = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@ -500,7 +501,7 @@ void gdk_dmanipulation_initialize_surface (GdkSurface *surface)
|
||||
|
||||
hr = IDirectManipulationManager_Activate (dmanipulation_manager,
|
||||
GDK_SURFACE_HWND (surface));
|
||||
HR_CHECK (hr);
|
||||
HR_CHECK_RETURN (hr);
|
||||
}
|
||||
|
||||
void gdk_dmanipulation_finalize_surface (GdkSurface *surface)
|
||||
@ -536,11 +537,11 @@ void gdk_dmanipulation_maybe_add_contact (GdkSurface *surface,
|
||||
|
||||
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_pan,
|
||||
pointer_id);
|
||||
HR_CHECK (hr);
|
||||
HR_CHECK_RETURN (hr);
|
||||
|
||||
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_zoom,
|
||||
pointer_id);
|
||||
HR_CHECK (hr);
|
||||
HR_CHECK_RETURN (hr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,6 @@ void _gdk_other_api_failed (const char *where,
|
||||
|
||||
#define HR_CHECK_RETURN(hr) { if G_UNLIKELY (FAILED (hr)) return; }
|
||||
#define HR_CHECK_RETURN_VAL(hr, val) { if G_UNLIKELY (FAILED (hr)) return val; }
|
||||
#define HR_CHECK(hr)
|
||||
#define HR_CHECK_GOTO(hr, label) { if G_UNLIKELY (FAILED (hr)) goto label; }
|
||||
|
||||
extern LRESULT CALLBACK _gdk_win32_surface_procedure (HWND, UINT, WPARAM, LPARAM);
|
||||
|
Loading…
Reference in New Issue
Block a user