Commit e5e2fac82116fe83cea3649d886af89e68ba5378

Edward Thomson 2019-01-21T00:57:39

buffer: explicitly cast Quiet down a warning from MSVC about how we're potentially losing data. This is safe since we've explicitly tested it.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/buffer.c b/src/buffer.c
index 0cc7f2b..51fb48a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -440,7 +440,7 @@ int git_buf_decode_base85(
 
 		acc += de;
 
-		cnt = (output_len < 4) ? output_len : 4;
+		cnt = (output_len < 4) ? (int)output_len : 4;
 		output_len -= cnt;
 		do {
 			acc = (acc << 8) | (acc >> 24);