[gimp] plug-ins: Make sure we initalize GimpVector4



commit 526a28de3ffa6c4333b7d04bd06c971cb46c2830
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Jul 8 09:50:25 2022 +0200

    plug-ins: Make sure we initalize GimpVector4
    
    This fixes a warning about the variable being used uninitialized.

 plug-ins/common/sphere-designer.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c
index 8185474f55..545596037a 100644
--- a/plug-ins/common/sphere-designer.c
+++ b/plug-ins/common/sphere-designer.c
@@ -1526,11 +1526,11 @@ calcphong (common * obj, ray * r2, GimpVector4 * col)
 static int
 traceray (ray * r, GimpVector4 * col, gint level, gdouble imp)
 {
-  gint     i, b = -1;
-  gdouble  t = -1.0, min = 0.0;
-  common  *obj, *bobj = NULL;
-  gint     hits = 0;
-  GimpVector4   p;
+  gint         i, b = -1;
+  gdouble      t = -1.0, min = 0.0;
+  common      *obj, *bobj = NULL;
+  gint         hits = 0;
+  GimpVector4  p = { 0, 0, 0, 0 };
 
   if ((level == 0) || (imp < 0.005))
     {


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