From 656b1413dbd7967806ad1723f7601d9377b42bad Mon Sep 17 00:00:00 2001 From: wb2osz Date: Sun, 26 Nov 2017 20:27:38 -0500 Subject: [PATCH] Uninitialized variables found by static analysis. --- geotranz/mgrs.c | 6 +++--- geotranz/usng.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/geotranz/mgrs.c b/geotranz/mgrs.c index 9fb8289..66128c6 100644 --- a/geotranz/mgrs.c +++ b/geotranz/mgrs.c @@ -868,7 +868,7 @@ long Convert_MGRS_To_Geodetic (char* MGRS, */ { /* Convert_MGRS_To_Geodetic */ long zone; - char hemisphere; + char hemisphere = '?'; double easting; double northing; long zone_exists; @@ -1260,9 +1260,9 @@ long Convert_MGRS_To_UPS ( char *MGRS, double false_northing; /* False northing for 3rd letter */ double grid_easting; /* easting for 100,000 meter grid square */ double grid_northing; /* northing for 100,000 meter grid square */ - long zone; + long zone = 0; long letters[MGRS_LETTERS]; - long in_precision; + long in_precision = 0; int index = 0; long error_code = MGRS_NO_ERROR; diff --git a/geotranz/usng.c b/geotranz/usng.c index 3db24b3..e083311 100644 --- a/geotranz/usng.c +++ b/geotranz/usng.c @@ -782,7 +782,7 @@ long Convert_USNG_To_Geodetic (char* USNG, */ { /* Convert_USNG_To_Geodetic */ long zone; - char hemisphere; + char hemisphere = '?'; double easting; double northing; long zone_exists; @@ -1178,9 +1178,9 @@ long Convert_USNG_To_UPS ( char *USNG, double false_northing; /* False northing for 3rd letter */ double grid_easting; /* easting for 100,000 meter grid square */ double grid_northing; /* northing for 100,000 meter grid square */ - long zone; + long zone = 0; long letters[USNG_LETTERS]; - long in_precision; + long in_precision = 0; int index = 0; long error_code = USNG_NO_ERROR;