Skip to content

Commit c3e9071

Browse files
committed
drivers/comparator: Silence GCC 14 uninitialized variable warning.
When the renesas-rv-lvd driver is built with SDK 1.0 using GCC 14, the compiler emits a spurious uninitialized variable warning because it can't follow the control flow to figure out that the variable wasn't ever used without being initialized. Work around this by simply initializing it to one of the valid values. Signed-off-by: Keith Packard <[email protected]>
1 parent 82f419d commit c3e9071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/comparator/comparator_renesas_ra_lvd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int lvd_renesas_ra_set_trigger(const struct device *dev, enum comparator_
7070
struct lvd_renesas_ra_data *data = dev->data;
7171
bool trigger_set = trigger != COMPARATOR_TRIGGER_NONE;
7272
bool reset = config->action == LVD_ACTION_RESET;
73-
lvd_voltage_slope_t voltage_slope;
73+
lvd_voltage_slope_t voltage_slope = LVD_VOLTAGE_SLOPE_BOTH;
7474
fsp_err_t fsp_err;
7575

7676
if (config->action == LVD_ACTION_NONE) {

0 commit comments

Comments
 (0)