The warning signs that a dog is dying are: twitching, lack of coordination, incontinence, no interest in surrounding, excessive fatigue or excessive lethargy.
1 Additional Answer
It is very hard to tell if a dog is dying. Normally a dog that is ready to die will stop eating and drinking. Have a serious conversation with your vet if you suspect there is something wrong with your dog. Most problems can be corrected.