mirror of git://git.sysmocom.de/ofono
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; ^~~~
This commit is contained in:
parent
5ee73d9101
commit
35b61e3ec2
|
@ -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);
|
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||||
char buf[UBLOX_MAX_USER_LEN + UBLOX_MAX_PASS_LEN + 32];
|
char buf[UBLOX_MAX_USER_LEN + UBLOX_MAX_PASS_LEN + 32];
|
||||||
unsigned auth;
|
unsigned auth = 0;
|
||||||
|
|
||||||
switch (auth_method) {
|
switch (auth_method) {
|
||||||
case OFONO_GPRS_AUTH_METHOD_PAP:
|
case OFONO_GPRS_AUTH_METHOD_PAP:
|
||||||
|
|
Loading…
Reference in New Issue