Skip to content

Commit 3197e7a

Browse files
aescolardkalowsk
authored andcommitted
drivers/fuel_gauge/lc709203f: Avoid declaring var right after label
Avoid the following clang error `error: label followed by a declaration is a C23 extension` by writing this switch case as a codeblock. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent f4c8a52 commit 3197e7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/fuel_gauge/lc709203f/lc709203f.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static int lc709203f_get_prop(const struct device *dev, fuel_gauge_prop_t prop,
533533
case FUEL_GAUGE_SBS_MODE:
534534
rc = lc709203f_get_power_mode(dev, (enum lc709203f_power_mode *)&val->sbs_mode);
535535
break;
536-
case FUEL_GAUGE_DESIGN_CAPACITY:
536+
case FUEL_GAUGE_DESIGN_CAPACITY: {
537537
enum lc709203f_battery_apa apa = LC709203F_APA_100MAH;
538538

539539
rc = lc709203f_get_apa(dev, &apa);
@@ -562,6 +562,7 @@ static int lc709203f_get_prop(const struct device *dev, fuel_gauge_prop_t prop,
562562
return -EINVAL;
563563
}
564564
break;
565+
}
565566
case FUEL_GAUGE_CURRENT_DIRECTION:
566567
rc = lc709203f_get_current_direction(
567568
dev, (enum lc709203f_current_direction *)&val->current_direction);

0 commit comments

Comments
 (0)