]> git.sur5r.net Git - openocd/commitdiff
Mac/PPC: Fix build.
authorJens Bauer <jens@gpio.dk>
Tue, 28 Oct 2014 04:14:05 +0000 (05:14 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 9 Jan 2015 08:42:15 +0000 (08:42 +0000)
GCC-4.2 on Mac/PPC complains about size_t is expected for %zx and the build stops.
In order to avoid other problems, I've chosen simply to typecast.

Change-Id: I99b569c4d1100e729712e31d24d6539f8b5971b6
Signed-off-by: Jens Bauer <jens@gpio.dk>
Reviewed-on: http://openocd.zylin.com/2360
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/target/target.c

index b74c6a0cc920323c3f185907da0894bbbecbc07d..6f458bcebe63d378a3cda378a5c1957a84798a4a 100644 (file)
@@ -906,7 +906,7 @@ int target_run_flash_async_algorithm(struct target *target,
                }
 
                LOG_DEBUG("offs 0x%zx count 0x%" PRIx32 " wp 0x%" PRIx32 " rp 0x%" PRIx32,
-                       (buffer - buffer_orig), count, wp, rp);
+                       (size_t) (buffer - buffer_orig), count, wp, rp);
 
                if (rp == 0) {
                        LOG_ERROR("flash write algorithm aborted by target");