After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478347 - GST_STATIC_PAD_TEMPLATE macro causes warnings with g++-4.2
GST_STATIC_PAD_TEMPLATE macro causes warnings with g++-4.2
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal blocker
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 478092
 
 
Reported: 2007-09-19 13:30 UTC by Tim-Philipp Müller
Modified: 2007-09-19 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2007-09-19 13:30:35 UTC
+++ This bug was initially created as a clone of Bug #478092 +++

Got the following compiler error:

 gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -I/opt/jhbuild/include/gstreamer-0.10 -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/libxml2 -I../../gst-libs -I../../gst-libs -pthread -I/opt/jhbuild/include/gstreamer-0.10 -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/libxml2 -Wall -Werror -g -DGST_DISABLE_DEPRECATED -I/usr/include/taglib -ggdb3 -O2 -MT libgsttaglib_la-gsttaglibmux.lo -MD -MP -MF .deps/libgsttaglib_la-gsttaglibmux.Tpo -c gsttaglibmux.c  -fPIC -DPIC -o .libs/libgsttaglib_la-gsttaglibmux.o
 g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/opt/jhbuild/include/gstreamer-0.10 -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/libxml2 -I../../gst-libs -I../../gst-libs -pthread -I/opt/jhbuild/include/gstreamer-0.10 -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/libxml2 -Wall -Werror -g -DGST_DISABLE_DEPRECATED -I/usr/include/taglib -g -O2 -MT libgsttaglib_la-gstid3v2mux.lo -MD -MP -MF .deps/libgsttaglib_la-gstid3v2mux.Tpo -c gstid3v2mux.cc  -fPIC -DPIC -o .libs/libgsttaglib_la-gstid3v2mux.o
cc1plus: warnings being treated as errors
gstid3v2mux.cc:73: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc:73: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc:73: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc:73: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc:78: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc: In function 'void gst_id3v2_mux_base_init(void*)':
gstid3v2mux.cc:100: warning: deprecated conversion from string constant to 'gchar*'
gstid3v2mux.cc:100: warning: deprecated conversion from string constant to 'gchar*'
make[3]: *** [libgsttaglib_la-gstid3v2mux.lo] Fout 1


Note: gcc (GCC) 4.2.2 20070909 (prerelease), x86_64.
Comment 1 Tim-Philipp Müller 2007-09-19 13:33:10 UTC
Should be fixed now (could have just put in a cast, but that seems a bit ugly):

 2007-09-19  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/glib-compat-private.h:
          Add compatibility macro for g_intern_string() for
          GLib-2.8 (any reason we can't just bump the
          requirement to at least 2.10?)

        * gst/gstpadtemplate.h:
        * gst/gstelementfactory.c:
        * gst/gstregistryxml.c:
        * gst/gstregistrybinary.c:
          Make GstStaticPadTemplate's templ_name field a const gchar * and fix
          up the internal code accordingly.  This shouldn't be a problem, since
          there is no reason external code could ever assume the string in such
          a structure is dynamically allocated unless it did that itself;  the
          use of g_strdup() is private to element factories.  The new code also
          saves some memory by putting pad template name strings into the GLib
          quark table instead of allocating them dynamically.
          Declaring this field constant fixes warnings with g++-4.2 when using
          the GST_STATIC_PAD_TEMPLATE macro in c++ code (#478092).