#3780 PYTHON: Avoid warnings with python3.7
Merged by jhrozek. Opened by lslebodn.
SSSD/ lslebodn/sssd python37  into  master

Download 3780.patch

src/python/pysss.c: In function 'PyList_AsStringList':
src/python/pysss.c:60:17: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
itemstr = PyUnicode_AsUTF8AndSize(item, &itemlen);
^

src/python/pyhbac.c: In function 'str_concat_sequence':
src/python/pyhbac.c:252:14: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
part = PyUnicode_AsUTF8(item);
^

The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() is now
of type const char * rather of char *. (Contributed by Serhiy
Storchaka in bpo-28769.)

https://docs.python.org/3.7/whatsnew/3.7.html
https://bugs.python.org/issue28769

rebased onto 3c5d4a836a523a03a90bc125ebef93a0608ea57c

Commit 2a3f2495 fixes this pull-request

Pull-Request has been merged by jhrozek

Metadata