On 02/08/2016 06:11 PM, Eric Blake wrote: > On 02/08/2016 03:45 PM, John Snow wrote: >> Coverity noticed that some variables are only used by debug prints, and >> called them unused. Always compile the print statements. >> >> Bonus: Fix a printf I broke. > > Might be nice to mention the commit that broke it. >
Sure. >> >> Signed-off-by: John Snow <[email protected]> >> --- >> hw/block/fdc.c | 15 ++++++++------- >> 1 file changed, 8 insertions(+), 7 deletions(-) >> > >> #define FLOPPY_DPRINTF(fmt, ...) \ >> - do { printf("FLOPPY: " fmt , ## __VA_ARGS__); } while (0) >> -#else >> -#define FLOPPY_DPRINTF(fmt, ...) >> -#endif >> + do { \ >> + if (DEBUG_FLOPPY) { \ >> + fprintf(stderr, "FLOPPY: " fmt , ## __VA_ARGS__); \ > > The switch from stdout to stderr doesn't hurt, either, if you want to > mention it in the commit as intentional. > Sure 2x combo > Reviewed-by: Eric Blake <[email protected]> > Thanks!
