Silence erroneous uninitialized value warning

The compiler is confused by the circular switch, and thinks that temp
might become uniniitalized. This is clearly false, as it is set at all
switch breaks.

Silence the warning by explicitly initializing it to zero.
master
Kenny Levinsen 2020-09-20 17:29:56 +02:00
parent f2f11dada2
commit 3353efc0ae
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -262,7 +262,7 @@ static void recalc_stops(struct context *ctx, time_t now) {
}
static void update_temperature(struct context *ctx, time_t now) {
int temp, temp_pos;
int temp = 0, temp_pos;
double time_pos;
recalc_stops(ctx, now);