[gtk+/gtk-2-24] gdkselection-win32.c: Declare Variables At Top Of Block
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gdkselection-win32.c: Declare Variables At Top Of Block
- Date: Fri, 16 May 2014 04:07:11 +0000 (UTC)
commit 7eb1c7701c48e2517b06c12179fdd23725320ef3
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri May 16 12:07:01 2014 +0800
gdkselection-win32.c: Declare Variables At Top Of Block
...so that builds on Visual C++ can be fixed.
gdk/win32/gdkselection-win32.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index 8be7e73..0553b98 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -1284,12 +1284,15 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
if (target == _image_bmp)
{
+ HGLOBAL hdatanew;
+ SIZE_T size;
+ guchar *ptr;
+
g_return_val_if_fail (GlobalSize (hdata) >= sizeof (BITMAPFILEHEADER), NULL);
/* No conversion is needed, just strip the BITMAPFILEHEADER */
- HGLOBAL hdatanew;
- SIZE_T size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
- guchar *ptr = GlobalLock (hdata);
+ size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
+ ptr = GlobalLock (hdata);
memmove (ptr, ptr + sizeof (BITMAPFILEHEADER), size);
GlobalUnlock (hdata);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]