Browse Source

tools: fixes for 64-bit.

printf's %.* means an unsigned arg, not a size_t.
Rusty Russell 15 years ago
parent
commit
afcb4f4dd0
2 changed files with 2 additions and 2 deletions
  1. 1 1
      tools/ccanlint/tests/examples_compile.c
  2. 1 1
      tools/tools.c

+ 1 - 1
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",
 	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)
 static void strip_leading_whitespace(char **lines)

+ 1 - 1
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,
 char *maybe_temp_file(const void *ctx, const char *extension, bool keep,
 		      const char *srcname)
 		      const char *srcname)
 {
 {
-	size_t baselen;
+	unsigned baselen;
 	char *f, *suffix = talloc_strdup(ctx, "");
 	char *f, *suffix = talloc_strdup(ctx, "");
 	struct stat st;
 	struct stat st;
 	unsigned int count = 0;
 	unsigned int count = 0;