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
parent
f2f11dada2
commit
3353efc0ae
2
main.c
2
main.c
|
@ -262,7 +262,7 @@ static void recalc_stops(struct context *ctx, time_t now) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_temperature(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;
|
double time_pos;
|
||||||
|
|
||||||
recalc_stops(ctx, now);
|
recalc_stops(ctx, now);
|
||||||
|
|
Loading…
Reference in New Issue