From 0223e2517eef43e0e6955408a1aef89d2d981983 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Mar 2018 22:26:15 +0100 Subject: geodesic.c: initialize various variables to please CLang Static Analyzer --- src/geodesic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/geodesic.c b/src/geodesic.c index a7e4376a..5121ea98 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -1894,7 +1894,7 @@ void geod_polygon_addedge(const struct geod_geodesic* g, struct geod_polygon* p, real azi, real s) { if (p->num) { /* Do nothing is num is zero */ - real lat, lon, S12 = 0; /* Initialize S12 to stop Visual Studio warning */ + real lat = 0, lon = 0, S12 = 0; /* Initialize S12 to stop Visual Studio warning */ geod_gendirect(g, p->lat, p->lon, azi, GEOD_LONG_UNROLL, s, &lat, &lon, 0, 0, 0, 0, 0, p->polyline ? 0 : &S12); @@ -2031,7 +2031,7 @@ unsigned geod_polygon_testedge(const struct geod_geodesic* g, tempsum = p->A[0]; crossings = p->crossings; { - real lat, lon, s12, S12; + real lat = 0, lon = 0, s12, S12 = 0; geod_gendirect(g, p->lat, p->lon, azi, GEOD_LONG_UNROLL, s, &lat, &lon, 0, 0, 0, 0, 0, &S12); -- cgit v1.2.3