+ CC: Stefano Stabellini

> On 24 Jun 2022, at 17:04, Anthony PERARD <anthony.per...@citrix.com> wrote:
> 
> Patch "tools: Add -Werror by default to all tools/" have added
> "-Werror" to CFLAGS in tools/Rules.mk, remove it from every other
> makefiles as it is now duplicated.
> 
> Signed-off-by: Anthony PERARD <anthony.per...@citrix.com>

Hi Anthony,

I will try to review the serie when I manage to have some time, in the mean 
time I can say the whole
serie builds fine in my Yocto setup on arm64 and x86_64, I’ve tried also the 
tool stack to
create/destroy/console guests and no problem so far.

The only problem I have is building for arm32 because, I think, this patch does 
a great job and it
discovers a problem here:

arm-poky-linux-gnueabi-gcc  -mthumb -mfpu=neon -mfloat-abi=hard 
-mcpu=cortex-a15  
--sysroot=/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/recipe-sysroot
   -marm -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes 
-Wdeclaration-after-statement -Wno-unused-but-set-variable 
-Wno-unused-local-typedefs   -Werror -O2 -fomit-frame-pointer 
-D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ -MMD -MP -MF 
.init-dom0less.o.d -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 
-fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security 
-Werror=format-security  -O2 -pipe -g -feliminate-unused-debug-types 
-fmacro-prefix-map=/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0=/usr/src/debug/xen-tools/4.17+git1-r0
                      
-fdebug-prefix-map=/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0=/usr/src/debug/xen-tools/4.17+git1-r0
                      
-fdebug-prefix-map=/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/recipe-sysroot=
                      
-fdebug-prefix-map=/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/recipe-sysroot-native=
  
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
 
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
 
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
 
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
 -D__XEN_TOOLS__ 
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
 -D__XEN_TOOLS__ 
-I/data_sdc1/lucfan01/test_kirkstone_xen/build/xtp-qemu-arm32/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/xen-tools/4.17+git1-r0/local-xen/xen/tools/helpers/../../tools/include
  -c -o init-dom0less.o init-dom0less.c 
init-dom0less.c: In function 'create_xenstore':
init-dom0less.c:141:53: error: format '%lu' expects argument of type 'long 
unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned 
int'} [-Werror=format=]
  141 |     rc = snprintf(max_memkb_str, STR_MAX_LENGTH, "%lu", 
info->max_memkb);
      |                                                   ~~^   ~~~~~~~~~~~~~~~
      |                                                     |       |
      |                                                     |       uint64_t 
{aka long long unsigned int}
      |                                                     long unsigned int
      |                                                   %llu
init-dom0less.c:144:56: error: format '%lu' expects argument of type 'long 
unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned 
int'} [-Werror=format=]
  144 |     rc = snprintf(target_memkb_str, STR_MAX_LENGTH, "%lu", 
info->current_memkb);
      |                                                      ~~^   
~~~~~~~~~~~~~~~~~~~
      |                                                        |       |
      |                                                        |       uint64_t 
{aka long long unsigned int}
      |                                                        long unsigned int
      |                                                      %llu
      

Won’t be too difficult to fix, if I have time I will do it, otherwise if 
someone wants to do it’s fine for me.

Cheers,
Luca


Reply via email to