You have to initialize globals with constant expressions, variables don't work. If you want to initialize multiple variables using the same value, using #defines is idomatic:
#define PREV_TEMP_DEFAULT 2
static int previous_temp = PREV_TEMP_DEFAULT;
static int some_other_global = PREV_TEMP_DEFAULT + 2; /* constant expressions are ok */