GNOME Bugzilla – Bug 796093
gstmodule: fix warning
Last modified: 2018-05-14 14:06:32 UTC
Created attachment 371990 [details] [review] gstmodule: fix warning PyMapping_GetItemString’ discards ‘const’ qualifier from pointer target type
Review of attachment 371990 [details] [review]: I am not getting that warning and can't see where/how it could happen, can you show the whole warning please?
(In reply to Thibault Saunier from comment #1) > Review of attachment 371990 [details] [review] [review]: > > I am not getting that warning and can't see where/how it could happen, can > you show the whole warning please? CC _gi_gst_la-gstmodule.lo /home/havard/Code/pexnote/external/gstreamer/gst-python/gi/overrides/gstmodule.c: In function ‘gi_gst_get_type’: /home/havard/Code/pexnote/external/gstreamer/gst-python/gi/overrides/gstmodule.c:93:41: warning: passing argument 2 of ‘PyMapping_GetItemString’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] return PyMapping_GetItemString (dict, type_name); ^ In file included from /usr/include/python2.7/Python.h:133:0, from /home/havard/Code/pexnote/external/gstreamer/gst-python/gi/overrides/gstmodule.c:29: /usr/include/python2.7/abstract.h:1356:29: note: expected ‘char *’ but argument is of type ‘const gchar * {aka const char *}’ PyAPI_FUNC(PyObject *) PyMapping_GetItemString(PyObject *o, char *key); ^ CCLD _gi_gst.la
Pushed with a minor change in the commit message (specifying the issue was happening only with py2).