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. > > 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. Reviewed-by: Eric Blake <[email protected]> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
