Huh. I find it weird that nobody's made this point yet, but sweat doesn't smell, no matter how you eat. Stale sweat smells, and it take a couple of hours before that happens (to a noticeable degree, I mean - but mileage varies).
If there is an odor in gym, it's not actually due to exertion (unless you've spent roughly two and a half hours in the gym, which is hardly ideal), it's because you were sweating prior to the exercise, even if it wasn't a lot.
For this reason, if you live in a relatively cool area, wear fresh clothes and haven't done anything particularly demanding (even so much as a light jog) then there's absolutely no reason to wear deodorant. Unless you're the type of person who likes exercising early mornings (ie before your daily shower) or late in the evenings, in which case you probobly should. And even then, it's not a big deal if your gym is well ventilated.
This is all general mind. I already said it, but it bears repeating; everyone's different when it comes to BO.
Just some pointless anecdotal evidence: I used to train early mornings (7am) for a couple of hours with a group. None of us showered, or used deodorant prior to the exercises - bearing in mind that we were VERY cardio heavy - I never noticed a thing, and if they did they never said anything.