X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=convert-cache.c;h=93e477ad3b26ab5bb32fe1b638d5ba77075c1d4b;hb=2ecd90502f4615c4f1a9340dfaed3f78ecd23747;hp=631d1aa910e7328c99642495f93908c749074f91;hpb=812666c8e66a21e668c0789d0422aa5a7db54961;p=git.git diff --git a/convert-cache.c b/convert-cache.c index 631d1aa9..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; @@ -303,7 +303,7 @@ int main(int argc, char **argv) unsigned char sha1[20]; struct entry *entry; - if (argc != 2 || get_sha1_hex(argv[1], sha1)) + if (argc != 2 || get_sha1(argv[1], sha1)) usage("convert-cache "); entry = convert_entry(sha1);