Fix a couple of compiler warnings

This commit is contained in:
Kovid Goyal 2021-08-27 07:37:33 +05:30
parent 547df82cff
commit ddf4e7ca68
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ icu_Collator_collation_order(icu_Collator *self, PyObject *a_) {
order = ucol_next(iter, &status);
len = ucol_getOffset(iter);
end:
if (iter != NULL) ucol_closeElements(iter); iter = NULL;
if (iter != NULL) { ucol_closeElements(iter); iter = NULL; }
if (a != NULL) free(a);
if (PyErr_Occurred()) return NULL;
return Py_BuildValue("ii", order, len);

View File

@ -340,7 +340,7 @@ static void free_matcher(Matcher *self) {
}
nullfree(self->items); nullfree(self->item_lengths);
nullfree(self->level1); nullfree(self->level2); nullfree(self->level3);
if (self->collator != NULL) ucol_close(self->collator); self->collator = NULL;
if (self->collator != NULL) { ucol_close(self->collator); self->collator = NULL; }
}
static void
Matcher_dealloc(Matcher* self)