Am 13.05.2014 09:02, schrieb Marc Marí: > Modify debug macros to have the same format through the codebase and use regular > ifs instead of ifdef. > > As the debug printf is always put in code, some casting had to be added to avoid > warnings treated as errors at compile time. > > Signed-off-by: Marc Marí <marc.mari.barcelo@xxxxxxxxx> > --- > hw/i386/kvm/pci-assign.c | 9 ++++----- > hw/i386/multiboot.c | 6 ++++-- > target-i386/kvm.c | 8 ++++---- > xen-hvm.c | 12 ++++++------ > xen-mapcache.c | 8 ++++---- > 5 files changed, 22 insertions(+), 21 deletions(-) > > diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c > index e55421a..35757ae 100644 > --- a/hw/i386/kvm/pci-assign.c > +++ b/hw/i386/kvm/pci-assign.c > @@ -51,14 +51,13 @@ > //#define DEVICE_ASSIGNMENT_DEBUG > > #ifdef DEVICE_ASSIGNMENT_DEBUG > -#define DEBUG(fmt, ...) \ > - do { \ > - fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__); \ > - } while (0) > +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 1 > #else > -#define DEBUG(fmt, ...) > +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 0 > #endif > > +#define DEBUG(fmt, ...) QEMU_DPRINTF(DEVICE_ASSIGNMENT_DEBUG_ENABLED, "pci_assign", fmt, ## __VA_ARGS__) This is broken, QEMU_DPRINTF() is not defined yet. Looks like an ordering issue with 16/16. Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html