threads / patch / 442

patchFix warning in convert-cache

Subject: [patch-git] Fix warning in convert-cache

## tl;dr

One message between May 2, 2005 and May 2, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

tony.luck@intel.com· May 2, 2005, 17:57 UTC · lore

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

Show changes to diff +1 −1
@@ -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;

← back to recent threads