qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 02/29] numa: Allow setting NUMA distance for diff


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 02/29] numa: Allow setting NUMA distance for different NUMA nodes
Date: Tue, 30 May 2017 11:45:55 +0100

On 11 May 2017 at 20:18, Eduardo Habkost <address@hidden> wrote:
> From: He Chen <address@hidden>
>
> This patch is going to add SLIT table support in QEMU, and provides
> additional option `dist` for command `-numa` to allow user set vNUMA
> distance by QEMU command.

> Signed-off-by: He Chen <address@hidden>
> Message-Id: <address@hidden>
> Reviewed-by: Igor Mammedov <address@hidden>
> Reviewed-by: Andrew Jones <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>

Hi all; I'm afraid this patch breaks compilation on OSX:

> +static void parse_numa_distance(NumaDistOptions *dist, Error **errp)
> +{
> +    uint16_t src = dist->src;
> +    uint16_t dst = dist->dst;
> +    uint8_t val = dist->val;
> +
> +    if (src >= MAX_NODES || dst >= MAX_NODES) {
> +        error_setg(errp,
> +                   "Invalid node %" PRIu16
> +                   ", max possible could be %" PRIu16,
> +                   MAX(src, dst), MAX_NODES);
> +        return;
> +    }

/Users/pm215/src/qemu-for-merges/numa.c:236:20: error: format
specifies type 'unsigned short' but the argument has type 'int'
[-Werror,-Wformat]
                   MAX(src, dst), MAX_NODES);
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/qapi/error.h:163:35: note:
expanded from macro 'error_setg'
                        (fmt), ## __VA_ARGS__)
                                  ^
/sw/include/glib-2.0/glib/gmacros.h:192:20: note: expanded from macro 'MAX'
#define MAX(a, b)  (((a) > (b)) ? (a) : (b))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/numa.c:236:35: error: format
specifies type 'unsigned short' but the argument has type 'int'
[-Werror,-Wformat]
                   MAX(src, dst), MAX_NODES);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/qapi/error.h:163:35: note:
expanded from macro 'error_setg'
                        (fmt), ## __VA_ARGS__)
                                  ^
/Users/pm215/src/qemu-for-merges/include/sysemu/sysemu.h:165:19: note:
expanded from macro 'MAX_NODES'
#define MAX_NODES 128
                  ^~~

The OSX compiler is pickier about format strings than gcc,
and neither "MAX_NODES" nor "MAX(anything)" are uint16_t type.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]