You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Twister throws error format specifier mismatch while building tests/misc/print_format test on ACE(15,20,30)
To Reproduce scripts/twister -p intel_adsp/ace30/ptl/sim -T tests/misc/print_format -ll debug -b
Logs and console output
/tests/misc/print_format/src/main.c:11:33: error: format specifies type 'char' but the argument has type 'int' [-Werror,-Wformat]
printk("d%" PRId8 "\n", INT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:398:19: note: expanded from macro 'INT8_C'
#define INT8_C(x) x
^
/tests/misc/print_format/src/main.c:12:35: error: format specifies type 'short' but the argument has type 'int' [-Werror,-Wformat]
printk("d%" PRId16 "\n", INT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:410:20: note: expanded from macro 'INT16_C'
#define INT16_C(x) x
^
/tests/misc/print_format/src/main.c:16:33: error: format specifies type 'char' but the argument has type 'int' [-Werror,-Wformat]
printk("i%" PRIi8 "\n", INT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:398:19: note: expanded from macro 'INT8_C'
#define INT8_C(x) x
^
/tests/misc/print_format/src/main.c:17:35: error: format specifies type 'short' but the argument has type 'int' [-Werror,-Wformat]
printk("i%" PRIi16 "\n", INT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:410:20: note: expanded from macro 'INT16_C'
#define INT16_C(x) x
^
/tests/misc/print_format/src/main.c:21:33: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
printk("o%" PRIo8 "\n", INT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:398:19: note: expanded from macro 'INT8_C'
#define INT8_C(x) x
^
/tests/misc/print_format/src/main.c:22:35: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
printk("o%" PRIo16 "\n", INT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:410:20: note: expanded from macro 'INT16_C'
#define INT16_C(x) x
^
/tests/misc/print_format/src/main.c:26:34: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
printk("u%" PRIu8 "\n", UINT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:400:20: note: expanded from macro 'UINT8_C'
#define UINT8_C(x) x
^
/tests/misc/print_format/src/main.c:27:36: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
printk("u%" PRIu16 "\n", UINT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:412:21: note: expanded from macro 'UINT16_C'
#define UINT16_C(x) x
^
/tests/misc/print_format/src/main.c:31:34: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
printk("x%" PRIx8 "\n", UINT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:400:20: note: expanded from macro 'UINT8_C'
#define UINT8_C(x) x
^
/tests/misc/print_format/src/main.c:32:36: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
printk("x%" PRIx16 "\n", UINT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:412:21: note: expanded from macro 'UINT16_C'
#define UINT16_C(x) x
^
/tests/misc/print_format/src/main.c:36:34: error: format specifies type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat]
printk("X%" PRIX8 "\n", UINT8_C(8));
~~~~~~~~ ^
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:400:20: note: expanded from macro 'UINT8_C'
#define UINT8_C(x) x
^
/tests/misc/print_format/src/main.c:37:36: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
printk("X%" PRIX16 "\n", UINT16_C(16));
~~~~~~~~~ ^~
/twister-out/intel_adsp_ace30_ptl_sim/xt-clang/tests/misc/print_format/printk.format.picolibc/modules/picolibc/picolibc/include/stdint.h:412:21: note: expanded from macro 'UINT16_C'
#define UINT16_C(x) x
^
12 errors generated.
For some reasons, xt-clang does not like "%hhd" or "%hd"
(for example) being fed int data (same goes for unsigned ones)
and will always complain about mismatched types. GCC and newer
LLVM/Clang do not complain. This could be due to xt-clang
being based on older LLVM/Clang. So skip the check.
Fixes: zephyrproject-rtos#89008
Signed-off-by: Daniel Leung <[email protected]>
dcpleung
added a commit
to dcpleung/zephyr
that referenced
this issue
Apr 24, 2025
For some reasons, xt-clang does not like "%hhd" or "%hd"
(for example) being fed int data (same goes for unsigned ones)
and will always complain about mismatched types. GCC and newer
LLVM/Clang do not complain. This could be due to xt-clang
being based on older LLVM/Clang. So skip the check.
Fixes: zephyrproject-rtos#89008
Signed-off-by: Daniel Leung <[email protected]>
Describe the bug
Twister throws error
format specifier mismatch
while buildingtests/misc/print_format
test on ACE(15,20,30)To Reproduce
scripts/twister -p intel_adsp/ace30/ptl/sim -T tests/misc/print_format -ll debug -b
Logs and console output
Environment:
The text was updated successfully, but these errors were encountered: