From a13189e554355bf4a5f8c6693480d62c11f61ad1 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Thu, 21 Nov 2013 17:27:22 +1030 Subject: [PATCH] Fix printf formats --- commandline.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/commandline.c b/commandline.c index 74bc155c..6514f401 100644 --- a/commandline.c +++ b/commandline.c @@ -2774,8 +2774,8 @@ int app_reverse_lookup(const struct cli_parsed *parsed, struct cli_context *cont void context_switch_test(int); int app_mem_test(const struct cli_parsed *parsed, struct cli_context *context) { - int mem_size; - int addr; + size_t mem_size; + size_t addr; uint64_t count; @@ -2785,7 +2785,7 @@ int app_mem_test(const struct cli_parsed *parsed, struct cli_context *context) for(mem_size=1024;mem_size<=(128*1024*1024);mem_size*=2) { uint8_t *mem=malloc(mem_size); if (!mem) { - fprintf(stderr,"Could not allocate %dKB memory -- stopping test.\n",mem_size/1024); + fprintf(stderr,"Could not allocate %zdKB memory -- stopping test.\n",mem_size/1024); return -1; } @@ -2793,15 +2793,16 @@ int app_mem_test(const struct cli_parsed *parsed, struct cli_context *context) // delays when doing the reads for(addr=0;addr