[dia] [warningectomy] suggest braces around initialization of subobject



commit 155fe55864c587ab3f48c334d09e89012a223914
Author: Hans Breuer <hans breuer org>
Date:   Thu Oct 2 00:29:22 2014 +0200

    [warningectomy] suggest braces around initialization of subobject
    
    path-math.c:318:18: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        Split sp = { 0 };
                     ^
                     {}

 lib/path-math.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/path-math.c b/lib/path-math.c
index 22f3673..b3dbea2 100644
--- a/lib/path-math.c
+++ b/lib/path-math.c
@@ -315,7 +315,7 @@ _extract_splits (const GArray *crossing, gboolean one)
   GArray *result = g_array_new (FALSE, FALSE, sizeof(Split));
   int i;
   for (i = 0; i < crossing->len; ++i) {
-    Split sp = { 0 };
+    Split sp = { { 0, 0 }, 0 };
     sp.pt = g_array_index (crossing, Intersection, i).pt;
     if (one) {
       sp.seg = g_array_index (crossing, Intersection, i).seg_one;


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