Skip to content

Commit 30ba98a

Browse files
authored
Merge pull request libgit2#5636 from libgit2/pks-release-build-warnings
Fix release build warnings
2 parents 8087498 + b254a58 commit 30ba98a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/patch_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int parse_header_git_index(
198198
return -1;
199199

200200
if (git_parse_peek(&c, &ctx->parse_ctx, 0) == 0 && c == ' ') {
201-
uint16_t mode;
201+
uint16_t mode = 0;
202202

203203
git_parse_advance_chars(&ctx->parse_ctx, 1);
204204

src/refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ int git_reference_rename(
606606
const char *log_message)
607607
{
608608
refs_update_head_payload payload;
609-
git_signature *signature;
609+
git_signature *signature = NULL;
610610
git_repository *repo;
611611
int error;
612612

src/sysdir.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,11 @@ static int git_sysdir_find_in_dirlist(
298298
}
299299

300300
done:
301+
if (name)
302+
git_error_set(GIT_ERROR_OS, "the %s file '%s' doesn't exist", label, name);
303+
else
304+
git_error_set(GIT_ERROR_OS, "the %s directory doesn't exist", label);
301305
git_buf_dispose(path);
302-
git_error_set(GIT_ERROR_OS, "the %s file '%s' doesn't exist", label, name);
303306
return GIT_ENOTFOUND;
304307
}
305308

0 commit comments

Comments
 (0)