My rule of thumb is to not give a reason to pull over and get searched. That and try not to smoke in the car too much. I've been pulled over dozens of times with weed in the car somewhere, but if you don't look and act stoned and the car doesn't reek, the cop won't want to look. At least they don't bother me.
Of course, I'm a clean cut white guy in his mid 20s. You minority people may get the hard end of the racial profiling stick, I just don't know. If you're some young black kid that just got stuck with a beat up car, then the media says you may get beat down by the fuzz just for just driving around. If that was the case, I would just never smoke in the car. Sorry I wish it was better