Skip to content

Commit e3f2d95

Browse files
author
Vicent Martí
authored
Merge pull request #646 from libgit2/vmg/fixes
Compiler Warning fixes
2 parents df046b2 + 459fb4d commit e3f2d95

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

ext/rugged/rugged_blob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ static int rugged_load_merge_file_input(git_blob **out, git_repository *repo, ru
607607

608608
static VALUE rb_git_blob_merge_files(int argc, VALUE *argv, VALUE klass)
609609
{
610-
VALUE rb_repo, rb_ancestor, rb_ours, rb_theirs, rb_options, rb_result;
610+
VALUE rb_repo, rb_ancestor, rb_ours, rb_theirs, rb_options, rb_result = Qnil;
611611

612612
git_repository *repo = NULL;
613613
rugged_merge_file_input ancestor = RUGGED_MERGE_FILE_INPUT_INIT,

ext/rugged/rugged_patch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,10 @@ static VALUE rb_git_diff_patch_lines(int argc, VALUE *argv, VALUE self)
209209
{
210210
git_patch *patch;
211211
size_t lines = 0;
212+
int options = 0;
212213
VALUE rb_options;
213214
Data_Get_Struct(self, git_patch, patch);
214215

215-
int options = 0;
216-
217216
rb_scan_args(argc, argv, "0:", &rb_options);
218217
if (!NIL_P(rb_options)) {
219218
if (RTEST(rb_hash_aref(rb_options, CSTR2SYM("exclude_context")))) {

test/commit_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def test_format_to_mbox_multiple
519519
---
520520
file2.txt | 5 +++++
521521
file3.txt | 5 +++++
522-
2 files changed, 10 insertions(+), 0 deletions(-)
522+
2 files changed, 10 insertions(+)
523523
create mode 100644 file2.txt
524524
create mode 100644 file3.txt
525525

0 commit comments

Comments
 (0)