# [patch-git] Fix warning in convert-cache

1 messages from 2005-05-02 to 2005-05-02. Participants: tony.luck@intel.com.
Thread: https://gitlist.dev/t/442

## tony.luck@intel.com, 2005-05-02 17:57

Subject: [patch-git] Fix warning in convert-cache
Message-ID: <200505021757.j42Hv2S05725@unix-os.sc.intel.com>
URL: https://gitlist.dev/e/200505021757.j42Hv2S05725%40unix-os.sc.intel.com

```
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>

---

--- k/convert-cache.c
+++ l/convert-cache.c
@@ -99,7 +99,7 @@ static int write_subdirectory(void *buff
 			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;

```
