China warns of ‘necessary response’ in event of trade war with US