diff options
author | Martin Hundebøll <martin@geanix.com> | 2019-06-21 11:56:08 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2019-06-21 12:54:10 -0500 |
commit | 35b61e3ec22cf20ae670b82ab2acc672000aaf73 (patch) | |
tree | f9b36ba1fb13235518b88c9176f90fd4197cf182 /drivers/ubloxmodem | |
parent | 5ee73d91013b447f2cadfec73b6ab09458324046 (diff) | |
download | ofono-35b61e3ec22cf20ae670b82ab2acc672000aaf73.tar.gz |
ubloxmodem: fix maybe-unitialized error
Fixes:
../git/drivers/ubloxmodem/gprs-context.c: In function ‘ublox_gprs_activate_primary’:
../git/drivers/ubloxmodem/gprs-context.c:339:2: error: ‘auth’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
snprintf(buf, sizeof(buf), "AT+UAUTHREQ=%u,%u,\"%s\",\"%s\"",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcd->active_context, auth, username, password);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../git/drivers/ubloxmodem/gprs-context.c:324:11: note: ‘auth’ was declared here
unsigned auth;
^~~~
Diffstat (limited to 'drivers/ubloxmodem')
-rw-r--r-- | drivers/ubloxmodem/gprs-context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ubloxmodem/gprs-context.c b/drivers/ubloxmodem/gprs-context.c index 489f31e8..c5b789b6 100644 --- a/drivers/ubloxmodem/gprs-context.c +++ b/drivers/ubloxmodem/gprs-context.c @@ -321,7 +321,7 @@ static void ublox_send_uauthreq(struct ofono_gprs_context *gc, { struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc); char buf[UBLOX_MAX_USER_LEN + UBLOX_MAX_PASS_LEN + 32]; - unsigned auth; + unsigned auth = 0; switch (auth_method) { case OFONO_GPRS_AUTH_METHOD_PAP: |