On 02/22/2019 01:51 PM, Simon Richter wrote:
Hi,

On 22.02.19 22:48, Niveditha Rau wrote:

When compiling pixman with Oracle Developer Studio on Solaris, we get
the following error:
pixman-0.38.0/pixman/pixman-radial-gradient.c", line 114: void function
cannot return value
Would the attached patch be acceptable upstream?
No, because the flow is different. It'd have to be

        if (repeat == PIXMAN_REPEAT_NONE)
        {
            if (0 <= t && t <= pixman_fixed_1)
+           {
-               return write_pixel (walker, t, buffer);
+               write_pixel (walker, t, buffer);
+               return;
+           }
        }

ok, thanks.  Please find attached a reworked patch.

Thanks
Niveditha

>From f1e290720d2ce7c0a238371bf100c478ac796771 Mon Sep 17 00:00:00 2001
From: Niveditha Rau <[email protected]>
Date: Fri, 22 Feb 2019 13:06:32 -0800
Subject: [PATCH] void function should not return a value

---
 pixman/pixman-radial-gradient.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c
index 0367d78..9760f2d 100644
--- a/pixman/pixman-radial-gradient.c
+++ b/pixman/pixman-radial-gradient.c
@@ -111,12 +111,18 @@ radial_write_color (double                         a,
 	if (repeat == PIXMAN_REPEAT_NONE)
 	{
 	    if (0 <= t && t <= pixman_fixed_1)
-		return write_pixel (walker, t, buffer);
+	    {
+		write_pixel (walker, t, buffer);
+		return;
+	    }
 	}
 	else
 	{
 	    if (t * dr >= mindr)
-		return write_pixel (walker, t, buffer);
+	    {
+		write_pixel (walker, t, buffer);
+		return;
+	    }
 	}
 
 	memset (buffer, 0, Bpp);
@@ -146,16 +152,28 @@ radial_write_color (double                         a,
 	if (repeat == PIXMAN_REPEAT_NONE)
 	{
 	    if (0 <= t0 && t0 <= pixman_fixed_1)
-		return write_pixel (walker, t0, buffer);
+	    {
+		write_pixel (walker, t0, buffer);
+		return;
+ 	    }
 	    else if (0 <= t1 && t1 <= pixman_fixed_1)
-		return write_pixel (walker, t1, buffer);
+	    {
+		write_pixel (walker, t1, buffer);
+		return;
+           }
 	}
 	else
 	{
 	    if (t0 * dr >= mindr)
-		return write_pixel (walker, t0, buffer);
+	    {
+		write_pixel (walker, t0, buffer);
+		return;
+	    }
 	    else if (t1 * dr >= mindr)
-		return write_pixel (walker, t1, buffer);
+	    {
+		write_pixel (walker, t1, buffer);
+		return;
+	    }
 	}
     }
 
-- 
2.17.1

_______________________________________________
Pixman mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to