From: tony.luck@intel.com Date: Mon, 2 May 2005 17:57:02 +0000 (-0700) Subject: [PATCH] Fix warning in convert-cache X-Git-Tag: v0.99~658 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f220fb6b84e982417dda30b2fd09a0f1d987d2e4;p=git.git [PATCH] Fix warning in convert-cache gcc 3.4.3 kicks out this warning: convert-cache.c: In function `write_subdirectory': convert-cache.c:102: warning: field precision is not type int (arg 4) Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds --- diff --git a/convert-cache.c b/convert-cache.c index 4d34d2d5..93e477ad 100644 --- a/convert-cache.c +++ b/convert-cache.c @@ -99,7 +99,7 @@ static int write_subdirectory(void *buffer, unsigned long size, const char *base continue; } - newlen += sprintf(new + newlen, "%o %.*s", S_IFDIR, slash - path, path); + newlen += sprintf(new + newlen, "%o %.*s", S_IFDIR, (int)(slash - path), path); new[newlen++] = 0; sha1 = (unsigned char *)(new + newlen); newlen += 20;