summaryrefslogtreecommitdiff
path: root/src/patch_parse.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-20 19:20:12 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-25 22:31:01 +0000
commit80c3867b760a8e07d563ef08d47e47ad0a07bcd3 (patch)
tree5868fa9ce719b750855a026fe650f4a9b44cb5a1 /src/patch_parse.c
parent494448a5eb723b4d47a8cc97321f7f7375150465 (diff)
downloadlibgit2-80c3867b760a8e07d563ef08d47e47ad0a07bcd3.tar.gz
patch: explicitly cast down in parse_header_percent
Quiet down a warning from MSVC about how we're potentially losing data. This is safe since we've explicitly tested that it's within the range of 0-100.
Diffstat (limited to 'src/patch_parse.c')
-rw-r--r--src/patch_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/patch_parse.c b/src/patch_parse.c
index 1bf3ad861..647929fd5 100644
--- a/src/patch_parse.c
+++ b/src/patch_parse.c
@@ -282,7 +282,7 @@ static int parse_header_percent(uint16_t *out, git_patch_parse_ctx *ctx)
if (val < 0 || val > 100)
return -1;
- *out = val;
+ *out = (uint16_t)val;
return 0;
}