changeset 2133:2090d7f46de5

GTK: Fix warnings on OpenSolaris using the new macros.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 04 Jul 2020 20:47:27 +0000
parents 42f8ad7a89e8
children 9e6e4ebd5e96
files gtk/dw.c gtk3/dw.c
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Sat Jul 04 17:51:46 2020 +0000
+++ b/gtk/dw.c	Sat Jul 04 20:47:27 2020 +0000
@@ -1996,7 +1996,7 @@
    g_object_set_data(G_OBJECT(_DWApp), textbuf, NULL);  
    
    if(func)
-      func((HWND)g_variant_get_uint64(param), data);  
+      func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data);  
 }
 #endif
 
@@ -2129,7 +2129,7 @@
    if(!_dw_app_id[0])
    {
       /* Generate an Application ID based on the PID if all else fails. */
-      snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, getpid());
+      snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, (int)getpid());
    }
 
    /* Initialize the application subsystem on supported versions...
@@ -12398,7 +12398,8 @@
                g_notification_set_icon(notification, G_ICON(icon));
          }
       }
-      g_notification_set_default_action_and_target(notification, "app.notification", "t", (guint64)notification); 
+      g_notification_set_default_action_and_target(notification, "app.notification", "t", 
+                                                  (guint64)DW_POINTER_TO_ULONGLONG(notification)); 
    }
    return (HWND)notification;
 #else
--- a/gtk3/dw.c	Sat Jul 04 17:51:46 2020 +0000
+++ b/gtk3/dw.c	Sat Jul 04 20:47:27 2020 +0000
@@ -1971,7 +1971,7 @@
    g_object_set_data(G_OBJECT(_DWApp), textbuf, NULL);  
    
    if(func)
-      func((HWND)g_variant_get_uint64(param), data);  
+      func((HWND)DW_ULONGLONG_TO_POINTER(g_variant_get_uint64(param)), data);  
 }
 #endif
 
@@ -2057,7 +2057,7 @@
    if(!_dw_app_id[0])
    {
       /* Generate an Application ID based on the PID if all else fails. */
-      snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, getpid());
+      snprintf(_dw_app_id, _DW_APP_ID_SIZE, "%s.pid.%d", DW_APP_DOMAIN_DEFAULT, (int)getpid());
    }
 
    /* Initialize the application subsystem on supported versions...
@@ -11103,7 +11103,8 @@
                g_notification_set_icon(notification, G_ICON(icon));
          }
       }
-      g_notification_set_default_action_and_target(notification, "app.notification", "t", (guint64)notification); 
+      g_notification_set_default_action_and_target(notification, "app.notification", "t", 
+                                                  (guint64)DW_POINTER_TO_ULONGLONG(notification)); 
    }
    return (HWND)notification;
 #else