Commit 37ae0079 by Patrick Steinhardt

patch_parse: silence maybe-uninitialized warning

When building libgit2 with the release build type, then GCC complains
about mode being potentially uninitialized. While this seems to be a
false positive, let's silence this warning by zero-initializing the
mode.
parent 819492c1
...@@ -198,7 +198,7 @@ static int parse_header_git_index( ...@@ -198,7 +198,7 @@ static int parse_header_git_index(
return -1; return -1;
if (git_parse_peek(&c, &ctx->parse_ctx, 0) == 0 && c == ' ') { if (git_parse_peek(&c, &ctx->parse_ctx, 0) == 0 && c == ' ') {
uint16_t mode; uint16_t mode = 0;
git_parse_advance_chars(&ctx->parse_ctx, 1); git_parse_advance_chars(&ctx->parse_ctx, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment