[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 <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
tony.luck@intel.com 2005-05-02 10:57:02 -07:00 committed by Linus Torvalds
parent 7e8c174a97
commit f220fb6b84

View 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;