freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 26e9028f1: [sdf, sfnt] Handle minor compiler warnings


From: Werner Lemberg
Subject: [freetype2] master 26e9028f1: [sdf, sfnt] Handle minor compiler warnings.
Date: Tue, 13 Dec 2022 03:56:14 -0500 (EST)

branch: master
commit 26e9028f10657acefc801bb7d5276419963e60cb
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>

    [sdf, sfnt] Handle minor compiler warnings.
    
    * src/sdf/ftsdf.c (get_min_distance_conic): Initialize `nearest_point`.
    
    * src/sfnt/ttsvg.c (find_doc): Initialize `mid_doc`.
    
    Fixes #1195.
---
 src/sdf/ftsdf.c  | 6 ++++--
 src/sfnt/ttsvg.c | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index 07ffe0cba..5a51dfae7 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -2109,7 +2109,8 @@
     FT_Error  error = FT_Err_Ok;
 
     FT_26D6_Vec  aA, bB;         /* A, B in the above comment             */
-    FT_26D6_Vec  nearest_point;  /* point on curve nearest to `point`     */
+    FT_26D6_Vec  nearest_point = { 0, 0 };
+                                 /* point on curve nearest to `point`     */
     FT_26D6_Vec  direction;      /* direction of curve at `nearest_point` */
 
     FT_26D6_Vec  p0, p1, p2;     /* control points of a conic curve       */
@@ -2405,7 +2406,8 @@
     FT_Error  error = FT_Err_Ok;
 
     FT_26D6_Vec  aA, bB, cC;     /* A, B, C in the above comment          */
-    FT_26D6_Vec  nearest_point;  /* point on curve nearest to `point`     */
+    FT_26D6_Vec  nearest_point = { 0, 0 };
+                                 /* point on curve nearest to `point`     */
     FT_26D6_Vec  direction;      /* direction of curve at `nearest_point` */
 
     FT_26D6_Vec  p0, p1, p2;     /* control points of a conic curve       */
diff --git a/src/sfnt/ttsvg.c b/src/sfnt/ttsvg.c
index 1c1df7bfd..411813a98 100644
--- a/src/sfnt/ttsvg.c
+++ b/src/sfnt/ttsvg.c
@@ -207,7 +207,7 @@
     FT_Error  error;
 
     Svg_doc  start_doc;
-    Svg_doc  mid_doc;
+    Svg_doc  mid_doc = { 0, 0, 0, 0 }; /* pacify compiler */
     Svg_doc  end_doc;
 
     FT_Bool  found = FALSE;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]