]> git.gag.com Git - fw/openocd/commit
jtag/aice: fix build with clang on MacOS
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 24 Jul 2021 10:37:09 +0000 (12:37 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 31 Jul 2021 09:06:36 +0000 (10:06 +0100)
commitc8f92ee73b7c1d2bb67bb7f8653a8ea1be873665
tree1e470f85c7e26e6671e18a19fc28a55fd1031537
parentd9f99f6e26e6809b617d9ba36530ad4c32e912e1
jtag/aice: fix build with clang on MacOS

Commit fceb29d03ff9 ("jtag/aice: use macros in place of const
variables") replaces some 'static const uint8_t' with macros.
This breaks the build on MacOS because the macro values are of
'int' type that doesn't match with the printf format 'PRIx8'.

error: format specifies type 'unsigned char' but the
argument has type 'int' [-Werror,-Wformat]

Replace the printf format 'PRIx8' with 'x'.
While there, remove a useless cast to uint32_t and fix the printf
format too.

Change-Id: Ib87298a61637b75a2813f209e5209d39ab2745f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: fceb29d03ff9 ("jtag/aice: use macros in place of const variables")
Reviewed-on: http://openocd.zylin.com/6380
Tested-by: jenkins
src/jtag/aice/aice_usb.c