Skip to content

Commit 5d625c8

Browse files
committed
Fix two compiler warnings
1 parent df046b2 commit 5d625c8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
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")))) {

0 commit comments

Comments
 (0)