X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Fioutil.c;h=1b2f92610d95d2d23ea550d47f30e2270be5108d;hb=576b8a8a482a6cef25cccd713bbc781bb7f03806;hp=0021234a4bd745499310633a3e24df9011588c66;hpb=208fda15d523281b469ec4f9de8198c0958f41de;p=openocd.git diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index 0021234a4b..1b2f92610d 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -155,7 +155,7 @@ int handle_cat_command(struct command_context_s *cmd_ctx, char *cmd, int retval = loadFile(args[0], &data, &len); if (retval == ERROR_OK) { - command_print(cmd_ctx, "%s", data); + command_print(cmd_ctx, "%s", (char *)data); free(data); } else @@ -501,7 +501,7 @@ int handle_peek_command(struct command_context_s *cmd_ctx, char *cmd, char **arg unsigned long addr = strtoul(args[0], NULL, 0); volatile unsigned *address = (volatile unsigned *)addr; unsigned value = *address; - command_print(cmd_ctx, "0x%x : 0x%x", address, value); + command_print(cmd_ctx, "0x%p : 0x%x", address, (int)value); return ERROR_OK; }