]> git.sur5r.net Git - openocd/commit
target/nds32_disassembler: fix format specifiers warnings
authorPaul Fertser <fercerpav@gmail.com>
Fri, 17 Jan 2014 10:11:55 +0000 (14:11 +0400)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 4 Feb 2014 21:18:27 +0000 (21:18 +0000)
commit279878ccd7d287383bec256520d7496017c891b4
tree81789aed43021b244abe156938330ab712056ed3
parent3e0f34b198b1654f89fc96d04d4cfcb7b889c702
target/nds32_disassembler: fix format specifiers warnings

According to the standard every operation returns at least an integer,
so PRIu8 format specifier is not suitable for these values as is.

This breaks build on OS X (x86_64-apple-darwin13.0.0) with "Apple LLVM
version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)".

Fix by adding appropriate casts. In fact there's plenty of room (and
I'd say necessity) for factoring out common code in there, but it's
too invasive for a non-maintainer.

Change-Id: I7d2182eb1d2f86fa22c882fbbaa6cfadf1c3e8fc
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1878
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/nds32_disassembler.c