[gimp/gimp-2-10] libgimp: fix a type cast warning (win32).



commit 03491efa81f9769763f25e2b1b858bc055d140f0
Author: Jehan <jehan girinstud io>
Date:   Thu Oct 10 14:13:49 2019 +0200

    libgimp: fix a type cast warning (win32).
    
    I had this warning when cross-building for Windows 64-bit:
    
    > libgimp/gimpui.c:187:52: warning: passing argument 2 of
    > 'gdk_win32_window_foreign_new_for_display' makes pointer from integer
    > without a cast [-Wint-conversion]
    
    > note: expected 'HWND' {aka 'struct HWND__ *'} but argument is of type 'guint32' {aka 'unsigned int'}
    
    (cherry picked from commit cf6dae6f83da514d3ddd85aaf342f95579817b2c)

 libgimp/gimpui.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgimp/gimpui.c b/libgimp/gimpui.c
index b6589d7938..b41a9d88ef 100644
--- a/libgimp/gimpui.c
+++ b/libgimp/gimpui.c
@@ -201,7 +201,7 @@ gimp_ui_get_foreign_window (guint32 window)
 
 #ifdef GDK_WINDOWING_WIN32
   return gdk_win32_window_foreign_new_for_display (gdk_display_get_default (),
-                                                   window);
+                                                   (HWND) (uintptr_t) window);
 #endif
 
   return NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]