@@ -31,7 +31,7 @@ struct module_state {
31
31
PyObject * _max_bson_size_str ;
32
32
PyObject * _max_message_size_str ;
33
33
PyObject * _max_write_batch_size_str ;
34
- PyObject * _max_split_size_str ;
34
+ PyObject * _max_split_size_str ;
35
35
};
36
36
37
37
/* See comments about module initialization in _cbsonmodule.c */
@@ -45,7 +45,7 @@ struct module_state {
45
45
*
46
46
* Returns a new ref */
47
47
static PyObject * _error (char * name ) {
48
- PyObject * error ;
48
+ PyObject * error = NULL ;
49
49
PyObject * errors = PyImport_ImportModule ("pymongo.errors" );
50
50
if (!errors ) {
51
51
return NULL ;
@@ -75,9 +75,9 @@ static PyObject* _cbson_query_message(PyObject* self, PyObject* args) {
75
75
int begin , cur_size , max_size = 0 ;
76
76
int num_to_skip ;
77
77
int num_to_return ;
78
- PyObject * query ;
79
- PyObject * field_selector ;
80
- PyObject * options_obj ;
78
+ PyObject * query = NULL ;
79
+ PyObject * field_selector = NULL ;
80
+ PyObject * options_obj = NULL ;
81
81
codec_options_t options ;
82
82
buffer_t buffer = NULL ;
83
83
int length_location , message_length ;
@@ -221,12 +221,12 @@ static PyObject* _cbson_op_msg(PyObject* self, PyObject* args) {
221
221
/* NOTE just using a random number as the request_id */
222
222
int request_id = rand ();
223
223
unsigned int flags ;
224
- PyObject * command ;
224
+ PyObject * command = NULL ;
225
225
char * identifier = NULL ;
226
226
Py_ssize_t identifier_length = 0 ;
227
- PyObject * docs ;
228
- PyObject * doc ;
229
- PyObject * options_obj ;
227
+ PyObject * docs = NULL ;
228
+ PyObject * doc = NULL ;
229
+ PyObject * options_obj = NULL ;
230
230
codec_options_t options ;
231
231
buffer_t buffer = NULL ;
232
232
int length_location , message_length ;
@@ -535,8 +535,8 @@ static PyObject*
535
535
_cbson_encode_batched_op_msg (PyObject * self , PyObject * args ) {
536
536
unsigned char op ;
537
537
unsigned char ack ;
538
- PyObject * command ;
539
- PyObject * docs ;
538
+ PyObject * command = NULL ;
539
+ PyObject * docs = NULL ;
540
540
PyObject * ctx = NULL ;
541
541
PyObject * to_publish = NULL ;
542
542
PyObject * result = NULL ;
@@ -592,8 +592,8 @@ _cbson_batched_op_msg(PyObject* self, PyObject* args) {
592
592
unsigned char ack ;
593
593
int request_id ;
594
594
int position ;
595
- PyObject * command ;
596
- PyObject * docs ;
595
+ PyObject * command = NULL ;
596
+ PyObject * docs = NULL ;
597
597
PyObject * ctx = NULL ;
598
598
PyObject * to_publish = NULL ;
599
599
PyObject * result = NULL ;
@@ -868,8 +868,8 @@ _cbson_encode_batched_write_command(PyObject* self, PyObject* args) {
868
868
char * ns = NULL ;
869
869
unsigned char op ;
870
870
Py_ssize_t ns_len ;
871
- PyObject * command ;
872
- PyObject * docs ;
871
+ PyObject * command = NULL ;
872
+ PyObject * docs = NULL ;
873
873
PyObject * ctx = NULL ;
874
874
PyObject * to_publish = NULL ;
875
875
PyObject * result = NULL ;
0 commit comments