[PATCH] Fix warning in convert-cache
authortony.luck@intel.com <tony.luck@intel.com>
Mon, 2 May 2005 17:57:02 +0000 (10:57 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 2 May 2005 21:56:39 +0000 (14:56 -0700)
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 <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
convert-cache.c

index 4d34d2d57ecda02aea70fab008fab32f5a4391b0..93e477ad3b26ab5bb32fe1b638d5ba77075c1d4b 100644 (file)
@@ -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;