During warm-ups in practice in college our coach used to make us start off hitting with a partner inside the alleys. Really makes you focus. Stand slightly to the side (not right in the middle of the alley) so you can go forehand to forehand down the line, then move to the other side and go backand to backhand down the line. You don't have to hit every ball inside the doubles alley, but do your best and after a while you'll find it realy isn't as hard as it seems to keep 80-90% of those balls inside the alleys at a light rally pace.
Another warm-up drill for accuracy I did with my coach in juniors was to play 'hit the hash mark.' Pretty simple concept: rally until one of us hit the hash mark on the baseline.
The point of these is to give you a target in mind so you're not so casual about your warm up. The tennis court is too big to merely go about hitting keeping it within the sidelines. These types of drills give you visual guides to get you thinking about more precise targets.