[Asterisk-code-review] res_geolocation: Fix issues exposed by compiling with -O2 (asterisk[20])
George Joseph
asteriskteam at digium.com
Mon Sep 19 06:20:37 CDT 2022
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19259 )
Change subject: res_geolocation: Fix issues exposed by compiling with -O2
......................................................................
res_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(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
Michael Bradeen: Looks good to me, approved; Approved for Submit
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/+/19259
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: I1ea336bf7abbc16fa59b75720f0db8f1d960b3d4
Gerrit-Change-Number: 19259
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220919/935fa345/attachment.html>
More information about the asterisk-code-review
mailing list