#930 silence compilation warnings on RHEL5
Closed: Fixed None Opened 12 years ago by jhrozek.

The C API for Python extenstions changed between Python 2.4 (RHEL5) and Python 2.6/2.7 (RHEL6/Fedora 15).

The effect we see are compilation warnings because some of the structures (!PyMethodDef, !PyTypeObject.tp_name for instance) changed from "char " to "const char ". Older version that still use "char *" emit compilation warnings if string constants are used:

src/python/pysss.c:805: warning: initialization discards qualifiers from pointer target type
src/python/pysss.c:808: warning: initialization discards qualifiers from pointer target type
src/python/pysss.c:811: warning: initialization discards qualifiers from pointer target type

We should use the special sss_py_const_p() macro in these cases the same way we do in src/python/pyhbac.c


Fields changed

description: The C API for Python extenstions changed between Python 2.4 (RHEL5) and Python 2.6/2.7 (RHEL6/Fedora 15).

The effect we see are compilation warnings because some of the structures (PyMethodDef, PyTypeObject.tp_name for instance) changed from "char " to "const char ". Older version that still use "char *" emit compilation warnings if string constants are used.

We should use the special sss_py_const_p() macro in these cases the same way we do in src/python/pyhbac.c => The C API for Python extenstions changed between Python 2.4 (RHEL5) and Python 2.6/2.7 (RHEL6/Fedora 15).

The effect we see are compilation warnings because some of the structures (!PyMethodDef, !PyTypeObject.tp_name for instance) changed from "char " to "const char ". Older version that still use "char *" emit compilation warnings if string constants are used:
{{{
src/python/pysss.c:805: warning: initialization discards qualifiers from pointer target type
src/python/pysss.c:808: warning: initialization discards qualifiers from pointer target type
src/python/pysss.c:811: warning: initialization discards qualifiers from pointer target type
}}}

We should use the special sss_py_const_p() macro in these cases the same way we do in src/python/pyhbac.c

Fields changed

owner: somebody => pbrezina

master: 801ef60

milestone: NEEDS_TRIAGE => SSSD 1.6.0
resolution: => fixed
rhbz: =>
status: new => closed

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue assigned to pbrezina
- Issue set to the milestone: SSSD 1.6.0

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1972

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata