At the conceptual level, a warning is usually an indication used to attract a user's attention. For example, a phone may vibrate to send a warning that requires some attention.
A warning usually refers to the consequence of an action (or inaction). A warning may be issued before or during an action, but not (normally) afterwards.
Let's say you have the battery dead. Then a warning can be displayed as a message. The text can simply say "Battery: 2%", which is context sensitive and can be interpreted as a warning. If the text reads "Low battery, please charge the battery soon or the device will shut down." – then it is a warning that is displayed as a message with a warning.
In other words, this discussion becomes a discussion of semiotics, signs and signifiers, and meaning meanings.