[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Why not just initially set *s to NULL in _Unpickler_Read?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Why not just initially set *s to NULL in _Unpickler_Read?

It would be the third variant.

The fourth variant is to change the signature of _Unpickler_Read() and return 
char * (NULL on error). All these variants work, I examined them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay, I think it might make more sense for |s| to be a return value, but that 
change probably isn't appropriate for bugfix releases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0dcf7599517 by Benjamin Peterson in branch '3.4':
initialize return value to NULL to avoid compiler compliants (closes #25245)
https://hg.python.org/cpython/rev/f0dcf7599517

New changeset ef3b833b98c2 by Benjamin Peterson in branch '3.5':
merge 3.4 (#25245)
https://hg.python.org/cpython/rev/ef3b833b98c2

New changeset 4d23598f1428 by Benjamin Peterson in branch 'default':
merge 3.5 (#25245)
https://hg.python.org/cpython/rev/4d23598f1428

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file40593/issue25245_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here are two alternative solutions.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40592/issue25245_1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25245] Compile warnings in _pickle.c

2015-09-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Changeset 88d98f6c2d7d causes compile warnings in Modules/_pickle.c.

/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load_counted_long’:
/home/serhiy/py/cpython/Modules/_pickle.c:4752:15: warning: ‘pdata’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 value = _PyLong_FromByteArray((unsigned char *)pdata, (size_t)size,
   ^
/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load’:
/home/serhiy/py/cpython/Modules/_pickle.c:5534:24: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 idx = Py_CHARMASK(s[0]);
^
/home/serhiy/py/cpython/Modules/_pickle.c:5529:11: note: ‘s’ was declared here
 char *s;
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4800:7: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 x = _PyFloat_Unpack8((unsigned char *)s, 0);
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4795:11: note: ‘s’ was declared here
 char *s;
   ^

--
components: Extension Modules
messages: 251683
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Compile warnings in _pickle.c
type: compile error
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com