On 2006-03-20, Stokes, Mark <msto...@idexcorp.com> wrote: > That's a silly statement, the build code is exactly the same. > One has a warning, one doesn't.
I always set up my Makefiles so that any compiler warning is considered an error. I don't ship code with warnings. You may think that's silly, but I'm convinced that I've prevented quite a few bugs by turning on all (or nearly all) of the compiler warnings and fixing all of the warnings. > And if you only want to wake for a serial IRQ, That's not what I said. I only want to wake up from the IRQ _conditionally_. For example: I want to wake up when the receive frame is complete. I only want to wake up after the last byte of a message. I don't want to wake up for every byte in the message. I only want to wake up after an entire message has been received. > then put the wakeup in the serial IRQ handler. That would wake up the processor for every single byte in the message. The processor doesn't need to wake up until after an entire message has been received. > If that's still not good enough, then have the main code > retest for "time to wakeup" and if it fails, just go to sleep > again. Wake the processor up on every byte of a 100 byte message just so it can go back to sleep the first 99 times? That's ugly, and it's burning power. Waking the processor when the message is complete is the right way to do it. Not allowing warnings in production code is the right thing to do. Fixing the compiler to allow things to be done the right way took less time than explaining this. >>> That's why there are compiler switches that allow certain >>> warnings to be ignored. >> >> Which compiler switch disables that warning? I notice you haven't answered that question yet. -- Grant Edwards grante Yow! My nose feels like a at bad Ronald Reagan movie... visi.com