Kaydet (Commit) 2b38fc18 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

gcc doesn't realize that dummy is always initialized by the function call

and warns about potential uninitialized use.
Silence that by initializing it to null.
üst 2489bd83
...@@ -1132,7 +1132,7 @@ _Unpickler_Read(UnpicklerObject *self, char **s, Py_ssize_t n) ...@@ -1132,7 +1132,7 @@ _Unpickler_Read(UnpicklerObject *self, char **s, Py_ssize_t n)
(self->frame_end_idx == -1 || (self->frame_end_idx == -1 ||
self->frame_end_idx <= self->next_read_idx)) { self->frame_end_idx <= self->next_read_idx)) {
/* Need to read new frame */ /* Need to read new frame */
char *dummy; char *dummy = NULL;
unsigned char *frame_start; unsigned char *frame_start;
size_t frame_len; size_t frame_len;
if (_Unpickler_ReadUnframed(self, &dummy, FRAME_HEADER_SIZE) < 0) if (_Unpickler_ReadUnframed(self, &dummy, FRAME_HEADER_SIZE) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment