On 15/12/2022 1:31 pm, Viresh Kumar wrote:
The field 'base' in 'struct libxl_device_virtio' is defined as uint64, while we are printing it with '%lu', which is 32bit only 32-bit platforms. And so generates a error like:
libxl_internal.h:4388:51: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Werror=format=]
Fix the same by using PRIx64 instead.
Now that the base name is available in hexadecimal format, prefix it with '0x' as well, which strtoul() also depends upon since base passed is 0.
Fixes: 43ba5202e2ee ("libxl: add support for generic virtio device") Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
In order to unblock OSSTest, I've committed this with an adjusted commit message, with the agreement on Anthony on IRC.
~Andrew