HTC warns of weaker fourth quarter