Why no "warning shot?" We could've dropped it onto a more remote region where the destructive power could be seen without killing many (even a small military post). The Japanese were already considering a surrender before we dropped the bomb, just showing the power of it without killing all those people would've had the same effect.
We've had the bomb for over sixty years. We've used it on one country (twice). We've openly tested the bombs many more times. No one is unaware of its effects.
Despite all of that, in every war since WWII we have seen our troops attacked, often by "insurgents", "guerillas" or terrorists. In none of these wars has there been a surrender simply because we have the bomb.
Therefore, there is little, if any, basis to conclude that Japan would have surrendered just because they saw a demonstration of the A-bomb.