diff --git a/hw/drivers/sensors/ina219/src/ina219_shell.c b/hw/drivers/sensors/ina219/src/ina219_shell.c index 89732b0624..e6ea4c2a65 100644 --- a/hw/drivers/sensors/ina219/src/ina219_shell.c +++ b/hw/drivers/sensors/ina219/src/ina219_shell.c @@ -79,7 +79,7 @@ static int ina219_shell_cmd_fs(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 1, &rc); @@ -96,7 +96,7 @@ static int ina219_shell_cmd_soft_avg(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 1, 100, &rc); @@ -113,7 +113,7 @@ static int ina219_shell_cmd_smod(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 7, &rc); @@ -130,7 +130,7 @@ static int ina219_shell_cmd_vmod(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 15, &rc); diff --git a/hw/drivers/sensors/ina226/src/ina226_shell.c b/hw/drivers/sensors/ina226/src/ina226_shell.c index 72ff909389..3ecf8c6480 100644 --- a/hw/drivers/sensors/ina226/src/ina226_shell.c +++ b/hw/drivers/sensors/ina226/src/ina226_shell.c @@ -82,7 +82,7 @@ static int ina226_shell_cmd_avg(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 7, &rc); @@ -99,7 +99,7 @@ static int ina226_shell_cmd_soft_avg(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 1, 100, &rc); @@ -116,7 +116,7 @@ static int ina226_shell_cmd_sct(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 7, &rc); @@ -133,7 +133,7 @@ static int ina226_shell_cmd_vct(int argc, char **argv) { int rc = -1; - long long val; + long long val = 0; if (argc == 3) { val = parse_ll_bounds(argv[2], 0, 7, &rc);