diff --git a/bson/_cbsonmodule.c b/bson/_cbsonmodule.c index b706c35e30..51ad13a008 100644 --- a/bson/_cbsonmodule.c +++ b/bson/_cbsonmodule.c @@ -2512,8 +2512,8 @@ static PyObject* get_value(PyObject* self, PyObject* name, const char* buffer, * Wrap any non-InvalidBSON errors in InvalidBSON. */ if (PyErr_Occurred()) { - PyObject *etype, *evalue, *etrace; - PyObject *InvalidBSON; + PyObject *etype = NULL, *evalue = NULL, *etrace = NULL; + PyObject *InvalidBSON = NULL; /* * Calling _error clears the error state, so fetch it first. @@ -2585,8 +2585,8 @@ static int _element_to_dict(PyObject* self, const char* string, if (!*name) { /* If NULL is returned then wrap the UnicodeDecodeError in an InvalidBSON error */ - PyObject *etype, *evalue, *etrace; - PyObject *InvalidBSON; + PyObject *etype = NULL, *evalue = NULL, *etrace = NULL; + PyObject *InvalidBSON = NULL; PyErr_Fetch(&etype, &evalue, &etrace); if (PyErr_GivenExceptionMatches(etype, PyExc_Exception)) { diff --git a/pymongo/_cmessagemodule.c b/pymongo/_cmessagemodule.c index 9c8fb550f2..b5adbeec32 100644 --- a/pymongo/_cmessagemodule.c +++ b/pymongo/_cmessagemodule.c @@ -31,7 +31,7 @@ struct module_state { PyObject* _max_bson_size_str; PyObject* _max_message_size_str; PyObject* _max_write_batch_size_str; - PyObject* _max_split_size_str; + PyObject* _max_split_size_str; }; /* See comments about module initialization in _cbsonmodule.c */