Even before I flew to Rio de Janeiro I was getting warnings about personal safety from friends, colleagues and family. Without rehashing the usual advice (walk briskly and do not pull out a camera to take pictures, do not wear a nice watch, etc.) I thought I could add a little fresh detail.
A 2008 article in the New York Times says you must also pay attention to your clothes, especially on the beach:
..dress for the beach as the Cariocas do, the implication being that I would otherwise look like a gringo and become the target of every panhandler, pineapple salesman and potential kidney-napper
Two caveats to this kind of advice. First, tan lines also matter. If your dark tan starts below your knees, expect to stand out from the Cariocas. A short suit far above a tan line actually makes your impersonation worse. You are better off with a local pair of board shorts. Second, I have been told on very good authority that the color of a Sunga has meaning. The Times talks about a “world of sungas to be explored” but black is actually a safe bet.