Skip to content

Commit 81bde5d

Browse files
committed
Fix compiler warnings
1 parent e15c0d8 commit 81bde5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/diff.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ Diff_patch__get__(Diff *self)
296296
git_patch* patch;
297297
git_buf buf = {NULL};
298298
int err = GIT_ERROR;
299-
size_t i, len, num;
299+
size_t i, num;
300300
PyObject *py_patch = NULL;
301301

302302
num = git_diff_num_deltas(self->diff);
303303
if (num == 0)
304304
Py_RETURN_NONE;
305305

306-
for (i = 0, len = 1; i < num ; ++i) {
306+
for (i = 0; i < num ; ++i) {
307307
err = git_patch_from_diff(&patch, self->diff, i);
308308
if (err < 0)
309309
goto cleanup;

src/types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ typedef struct {
103103
typedef struct {
104104
PyObject_HEAD
105105
PyObject* hunks;
106-
const char * old_file_path;
107-
const char * new_file_path;
106+
char * old_file_path;
107+
char * new_file_path;
108108
PyObject* old_id;
109109
PyObject* new_id;
110110
char status;

0 commit comments

Comments
 (0)