]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_geolocation: Fix issues exposed by compiling with -O2
authorGeorge Joseph <gjoseph@digium.com>
Fri, 16 Sep 2022 13:43:00 +0000 (07:43 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Fri, 16 Sep 2022 14:42:21 +0000 (08:42 -0600)
Fixed "may be used uninitialized" errors in geoloc_config.c.

ASTERISK-30234

Change-Id: I1ea336bf7abbc16fa59b75720f0db8f1d960b3d4

res/res_geolocation/geoloc_config.c

index dea7a22050e5146a4056f53f9c905c442f531d30..26dd2d9fd1205c9a467e1f85b9ec2c442070e990 100644 (file)
@@ -187,7 +187,7 @@ static int geoloc_profile_apply_handler(const struct ast_sorcery *sorcery, void
        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)) {