[Asterisk-code-review] geolocation: Fix issues exposed by compiling with -O2 (asterisk[certified/18.9])

George Joseph asteriskteam at digium.com
Fri Sep 16 08:55:14 CDT 2022


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/19266 )


Change subject: geolocation: Fix issues exposed by compiling with -O2
......................................................................

geolocation: Fix issues exposed by compiling with -O2

Fixed "may be used uninitialized" errors in geoloc_config.c.

ASTERISK-30234

Change-Id: I1ea336bf7abbc16fa59b75720f0db8f1d960b3d4
---
M res/res_geolocation/geoloc_config.c
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/19266/1

diff --git a/res/res_geolocation/geoloc_config.c b/res/res_geolocation/geoloc_config.c
index dea7a22..26dd2d9 100644
--- a/res/res_geolocation/geoloc_config.c
+++ b/res/res_geolocation/geoloc_config.c
@@ -187,7 +187,7 @@
 	struct ast_geoloc_location *location;
 	const char *id = ast_sorcery_object_get_id(profile);
 	enum ast_geoloc_validate_result result;
-	enum ast_geoloc_format format;
+	enum ast_geoloc_format format = AST_GEOLOC_FORMAT_NONE;
 	int rc = 0;
 
 	if (!ast_strlen_zero(profile->location_reference)) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19266
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: certified/18.9
Gerrit-Change-Id: I1ea336bf7abbc16fa59b75720f0db8f1d960b3d4
Gerrit-Change-Number: 19266
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220916/5d9fdf00/attachment-0001.html>


More information about the asterisk-code-review mailing list