]> xenbits.xensource.com Git - xen.git/commit
build/printf: fix incorrect format specifiers
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 17 Feb 2017 15:09:38 +0000 (16:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Feb 2017 15:09:38 +0000 (16:09 +0100)
commitd4906b5d052b16a259fb7416799fd623d4b42e2c
treecc3de482b5b07c5a73c92d5ee0709a7b8e4bf9d0
parent193c6f8de9b624def91a6ee8113eb2f18f62bc83
build/printf: fix incorrect format specifiers

The following incorrect format specifiers and incorrect number of parameters
passed to printf like functions are reported by clang:

mce.c:601:18: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                 smp_processor_id());
                 ^

xenpm.c:102:23: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                what, argv[argc > 1]);
                      ^

libxl_internal.c:25:69: error: data argument not used by format string
      [-Werror,-Wformat-extra-args]
    libxl__log(ctx, XTL_CRITICAL, ENOMEM, 0,0, func, INVALID_DOMID, L);
                                                                    ^
libxl_internal.c:24:17: note: expanded from macro 'L'
          func, (unsigned long)nmemb, (unsigned long)size
                ^
libxl_internal.c:26:21: error: data argument not used by format string
      [-Werror,-Wformat-extra-args]
    fprintf(stderr, L);
                    ^
libxl_internal.c:24:17: note: expanded from macro 'L'
          func, (unsigned long)nmemb, (unsigned long)size
                ^

This patch contains the fixes for them and enables -Wformat for clang.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Config.mk
tools/libxl/libxl_internal.c
tools/misc/xenpm.c
xen/arch/x86/cpu/mcheck/mce.c