fix flash.c build errors