They showed this intent by indiscriminately slaughtering civilians and military personnel.
Personally, I'm okay with it, mostly because the alternative was invasion, which would have caused a million American casualties and wiped Japan off the face of the map. That would have been unpleasant.
By the way if you want a semi-scholarly but not entirely dry treatment of the moral problem of Truman's bombs I can recommend the book "Prompt and Utter Destruction".
Given that the atomic bomb was secret, "prompt and utter destruction" is only a warning in retrospect. There is no way that you can read the Potsdam declaration and think, "oh, they are going to start dropping atomic bombs on cities soon," if you don't know what an atomic bomb is or that they exist.
I wonder how important "warning" really is though if it is this vague. Imagine country A is at war with country B. Country A issues an announcement: "if country B does not do what we want, we will set off a bomb in one of country B's major cities." If they follow through with it, does this sort of warning absolve them of responsibility? Does the presence or absence of this kind of vague warning have any effect either way on the ethical calculus regarding the targeting of civilians?
It seems to me that if it is ethical then it is ethical without the warning, and if it is not ethical then it is not ethical with the warning. Which makes the warning question a red herring.
The firebombing of Tokyo (one of many examples - many Japanese cities suffered mass destruction in conventional bombings) was just as, if not more, horrific than Hiroshima or Nagasaki. Why would the residents care whether they were being firebombed or nuclear bombed?
Also, it's probably not clear cut if it is a war crime. War is a horrible grizzly thing and very little is off limits in terms of offensive action.
yes, the torpedo factories are a valid target. How large were those, how many square meters of the final destruction was a military target? A city with families and children is not a valid target. If Truman gave a warning to the civilians beforehand most of them could have been saved and they could have still destroyed the factories ...
According to the geneva conventions it is a war crime (not arguing about how reasonable the conventions are etc.).