From afcb4f4dd0d88c699d816883d62c8cff5f37ca0d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 20 Oct 2010 12:37:45 +1030 Subject: [PATCH] tools: fixes for 64-bit. printf's %.* means an unsigned arg, not a size_t. --- tools/ccanlint/tests/examples_compile.c | 2 +- tools/tools.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ccanlint/tests/examples_compile.c b/tools/ccanlint/tests/examples_compile.c index b1798c93..4f2d2c8a 100644 --- a/tools/ccanlint/tests/examples_compile.c +++ b/tools/ccanlint/tests/examples_compile.c @@ -156,7 +156,7 @@ static char *add_func(char *others, const char *line) } return talloc_asprintf_append(others, "printf(\"%%p\", %.*s);\n", - end - p + 1, p); + (unsigned)(end - p + 1), p); } static void strip_leading_whitespace(char **lines) diff --git a/tools/tools.c b/tools/tools.c index 16246593..b9344827 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -213,7 +213,7 @@ char *temp_dir(const void *ctx) char *maybe_temp_file(const void *ctx, const char *extension, bool keep, const char *srcname) { - size_t baselen; + unsigned baselen; char *f, *suffix = talloc_strdup(ctx, ""); struct stat st; unsigned int count = 0; -- 2.39.2