Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f288295

Browse files
committed
mmap_flush_method(): Squash compiler warning about
mixing signed and unsigned types in comparison.
1 parent 8f9cc29 commit f288295

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/mmapmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ mmap_flush_method(mmap_object *self, PyObject *args)
471471
Py_ssize_t offset = 0;
472472
Py_ssize_t size = self->size;
473473
CHECK_VALID(NULL);
474-
if (!PyArg_ParseTuple(args, "|nn:flush", &offset, &size)) {
474+
if (!PyArg_ParseTuple(args, "|nn:flush", &offset, &size))
475475
return NULL;
476-
} else if ((offset + size) > self->size) {
476+
if ((size_t)(offset + size) > self->size) {
477477
PyErr_SetString(PyExc_ValueError, "flush values out of range");
478478
return NULL;
479479
} else {

0 commit comments

Comments
 (0)