Fix compiler warnings

This commit is contained in:
Greg Fitzgerald
2015-01-14 14:25:39 +00:00
parent e15c0d828b
commit 81bde5d0e7
2 changed files with 4 additions and 4 deletions

View File

@@ -296,14 +296,14 @@ Diff_patch__get__(Diff *self)
git_patch* patch;
git_buf buf = {NULL};
int err = GIT_ERROR;
size_t i, len, num;
size_t i, num;
PyObject *py_patch = NULL;
num = git_diff_num_deltas(self->diff);
if (num == 0)
Py_RETURN_NONE;
for (i = 0, len = 1; i < num ; ++i) {
for (i = 0; i < num ; ++i) {
err = git_patch_from_diff(&patch, self->diff, i);
if (err < 0)
goto cleanup;

View File

@@ -103,8 +103,8 @@ typedef struct {
typedef struct {
PyObject_HEAD
PyObject* hunks;
const char * old_file_path;
const char * new_file_path;
char * old_file_path;
char * new_file_path;
PyObject* old_id;
PyObject* new_id;
char status;