fixed compile warning regarding assigned-only variables
fixed compile warning regarding ISOC90