Skip to content

Commit e9d69da

Browse files
committed
Fix warnings
1 parent 1f5c3b3 commit e9d69da

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/blob.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ Blob__write_to_queue(Blob *self, PyObject *args, PyObject *kwds)
286286
git_blob *blob = NULL;
287287
const git_oid *blob_oid;
288288
struct blob_filter_stream writer;
289-
PyObject *result = NULL;
290289

291290
if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO|nzIO", keywords,
292291
&py_queue, &py_ready, &py_closed,

src/filter.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ filter__write_next(PyObject *self, PyObject *args, PyObject *kwds)
200200

201201
static PyMethodDef filter__write_next_method = {
202202
"_write_next",
203-
filter__write_next,
203+
(PyCFunction)filter__write_next,
204204
METH_VARARGS | METH_KEYWORDS,
205205
filter__write_next__doc__
206206
};
@@ -209,7 +209,7 @@ struct pygit2_filter_stream {
209209
git_writestream stream;
210210
git_writestream *next;
211211
PyObject *py_filter;
212-
PyObject *py_src;
212+
FilterSource *py_src;
213213
PyObject *py_write_next;
214214
};
215215

@@ -313,10 +313,11 @@ static int pygit2_filter_stream_close(git_writestream *s)
313313
if (stream->py_write_next != NULL)
314314
Py_DECREF(stream->py_write_next);
315315
PyGILState_Release(gil);
316-
if (stream->next != NULL)
316+
if (stream->next != NULL) {
317317
nexterr = stream->next->close(stream->next);
318318
if (err == 0)
319319
err = nexterr;
320+
}
320321
return err;
321322
}
322323

@@ -325,7 +326,7 @@ static void pygit2_filter_stream_free(git_writestream *s)
325326
}
326327

327328
static int pygit2_filter_stream_init(
328-
struct pygit2_filter_stream *stream, git_writestream *next, PyObject *py_filter, PyObject *py_src)
329+
struct pygit2_filter_stream *stream, git_writestream *next, PyObject *py_filter, FilterSource *py_src)
329330
{
330331
int err = 0;
331332
PyObject *py_next = NULL;
@@ -539,7 +540,6 @@ int pygit2_filter_stream(
539540

540541
void pygit2_filter_cleanup(git_filter *self, void *payload)
541542
{
542-
pygit2_filter *filter = (pygit2_filter *)self;
543543
struct pygit2_filter_payload *pl = (struct pygit2_filter_payload *)payload;
544544

545545
pygit2_filter_payload_free(pl);

src/pygit2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ PyMethodDef module_methods[] = {
369369
{"option", option, METH_VARARGS, option__doc__},
370370
{"reference_is_valid_name", reference_is_valid_name, METH_O, reference_is_valid_name__doc__},
371371
{"tree_entry_cmp", tree_entry_cmp, METH_VARARGS, tree_entry_cmp__doc__},
372-
{"filter_register", filter_register, METH_VARARGS | METH_KEYWORDS, filter_register__doc__},
372+
{"filter_register", (PyCFunction)filter_register, METH_VARARGS | METH_KEYWORDS, filter_register__doc__},
373373
{"filter_unregister", filter_unregister, METH_VARARGS, filter_unregister__doc__},
374374
{NULL}
375375
};

src/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ char* pgit_encode_fsdefault(PyObject *value);
9797
//PyObject * get_pylist_from_git_strarray(git_strarray *strarray);
9898
//int get_strarraygit_from_pylist(git_strarray *array, PyObject *pylist);
9999

100-
int py_object_to_otype(PyObject *py_type);
100+
git_otype py_object_to_otype(PyObject *py_type);
101101

102102
/* Helpers to make shorter PyMethodDef and PyGetSetDef blocks */
103103
#define METHOD(type, name, args)\

0 commit comments

Comments
 (0)