No. He didn't warn them. He threatened them.
Donald J. Trump
@realDonaldTrump
....Iran will be held fully responsible for lives lost, or damage incurred, at any of our facilities. They will pay a very BIG PRICE! This is not a Warning, it is a Threat. Happy New Year!
1:19 PM · Dec 31, 2019·Twitter for iPhone
General Soleimani was actively developing plans to attack American diplomats and service members in Iraq and throughout the region.
The White House (@WhiteHouse) January 3, 2020
They should have known better. Just like our dimocrats they don’t understand who is in power....Donald J Trump.