I've been to Rio several times in the past 5 years. I wouldn't call myself an expert but I'm pretty well-traveled all over, do pretty well when I'm there and know quite a few people and places. 
If you don't look and act like a local and you look like a gringo, all these "safety concerns" are not really for you. You'd just use the same common sense you'd use in any major city like New York, LA, or Paris. If you look pretty "white bread", or fresh off the plane, then yes, take these extra precautions. 
I'm a fit, athletic biracial male in my 30s. I look Like I could be Brazilian until I open my gringo mouth. I've learned I can blend in very easily. I can probably afford to be a bit flashier (and possibly a little riskier, as time goes by) than some other posters here. 
But yes, don't be dumb. Do what you'd do in the least safe areas in NYC or LA, if you're that cautious, and you'll be ok.