I live in Curitiba, around 600 or so KMs away from Rio.
As for Rio, don't go. DON'T GO! BY ALL MEANS, DON'T GO!
Back in 2008, on my way from the airport to my hotel in Copacabana, I saw a man being shot blank point.
My hotel had bullet proof windows and walls.
And things got worse since.
If despite all that, you decide to risk your life there:
1. Avoid the "favelas" by ALL MEANS. Going there means getting shot and killed with machine gun fire for taking a wrong turn.
2. Don't go out with lots of valuables. Carry some 20 USD bills with you to hand to the inevitable muggers.
3. If you go to the beach, take as little as possible with your. The "arrastões", where waves of thieves trample everyone who is there, robbing them of their belongings. They happen way too often
4. If you hear anything that sounds like gunshot, seek shelter asap. Drug lords gun fights and open wars are a thing there.
5. Avoid the Guanabara Bay unless you want to get sick. Super bacteria live there.
6. Use mosquito repellent and don't take part in... err... vigorous cuddling with local... professional girls without protection. Zika virus is a thing. A serious thing.
7. Be prepared to be overcharged for EVERYTHING.
If you follow those tips, you should make back home alive.
Edit:
This FB post should be public so you can watch the video.