fix gcc warning 'set but not used'