Commit 7a68142e2200c84c968731ed386acb9cda5e0858

Vicent Martí 2013-01-04T16:49:46

Merge pull request #1191 from maxpow4h/fix-format-string Fixed size_t format string warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index 34f0f84..91c72a7 100644
--- a/src/transports/smart_protocol.c
+++ b/src/transports/smart_protocol.c
@@ -517,7 +517,7 @@ static int gen_pktline(git_buf *buf, git_push *push)
 		git_oid_fmt(old_id, &spec->roid);
 		git_oid_fmt(new_id, &spec->loid);
 
-		git_buf_printf(buf, "%04x%s %s %s", len, old_id, new_id, spec->rref);
+		git_buf_printf(buf, "%04zx%s %s %s", len, old_id, new_id, spec->rref);
 
 		if (i == 0) {
 			git_buf_putc(buf, '\0');