changeset 2904:2b7babf491e1

Solaris: Fix warning because getpid() returns a long int. Not sure if all versions return long or not... so cast to long just in case older versions return int.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 25 Dec 2022 08:38:46 +0000
parents 9fd16f694a77
children 0f5008c05134
files gtk/dw.c gtk3/dw.c gtk4/dw.c
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Sun Dec 25 05:00:32 2022 +0000
+++ b/gtk/dw.c	Sun Dec 25 08:38:46 2022 +0000
@@ -2111,7 +2111,7 @@
 #elif defined(__sun__)
    char procpath[101] = {0};
 
-   snprintf(procpath, 100, "/proc/%d/path/a.out", getpid());
+   snprintf(procpath, 100, "/proc/%ld/path/a.out", (long)getpid());
 
    if(readlink(procpath, path, PATH_MAX) == -1)
 #endif
--- a/gtk3/dw.c	Sun Dec 25 05:00:32 2022 +0000
+++ b/gtk3/dw.c	Sun Dec 25 08:38:46 2022 +0000
@@ -2051,7 +2051,7 @@
 #elif defined(__sun__)
    char procpath[101] = {0};
 
-   snprintf(procpath, 100, "/proc/%d/path/a.out", getpid());
+   snprintf(procpath, 100, "/proc/%ld/path/a.out", (long)getpid());
 
    if(readlink(procpath, path, PATH_MAX) == -1)
 #endif
--- a/gtk4/dw.c	Sun Dec 25 05:00:32 2022 +0000
+++ b/gtk4/dw.c	Sun Dec 25 08:38:46 2022 +0000
@@ -1522,7 +1522,7 @@
 #elif defined(__sun__)
    char procpath[101] = {0};
 
-   snprintf(procpath, 100, "/proc/%d/path/a.out", getpid());
+   snprintf(procpath, 100, "/proc/%ld/path/a.out", (long)getpid());
 
    if(readlink(procpath, path, PATH_MAX) == -1)
 #endif