warning message when the images has not been saved
There is not a warning per se, but the image name in the Image Editor will have an asterisk next to it indicating it has changes to it - also, on my system, I do get a warning when closing a file that there are changes not saved. There is an option to pack all images into the file, and that works for some people - but also best practice is to save the image to disk first, and then make use of the save all dirty images operator.