Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354336

gstclock.c: compilation error: 'incompatible pointer type' with gcc 14

XMLWordPrintable

    • b15

         To reproduce, use gcc 14 to build JavaFX on Linux with media compilation enabled. It produces the following error:

        ../../../gstreamer-lite/gstreamer/gst/gstclock.c: In function 'gst_clock_entry_new':
        ../../../gstreamer-lite/gstreamer/gst/gstclock.c:178:48: error: passing argument 1 of 'g_weak_ref_init' from incompatible pointer type [-Wincompatible-pointer-types]
          178 | #define GST_CLOCK_ENTRY_CLOCK_WEAK_REF(entry) (&((GstClockEntryImpl *)(entry))->clock)
              | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              | |
              | GWeakRef **
        ../../../gstreamer-lite/gstreamer/gst/gstclock.c:274:20: note: in expansion of macro 'GST_CLOCK_ENTRY_CLOCK_WEAK_REF'
          274 | g_weak_ref_init (GST_CLOCK_ENTRY_CLOCK_WEAK_REF (entry), clock);
              | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        In file included from /usr/include/glib-2.0/gobject/gbinding.h:29,
                         from /usr/include/glib-2.0/glib-object.h:23,
                         from ../../../gstreamer-lite/gstreamer/gst/gstobject.h:29,
                         from ../../../gstreamer-lite/gstreamer/gst/gstplugin.h:29,
                         from ../../../gstreamer-lite/gstreamer/gst/gstregistry.h:28,
                         from ../../../gstreamer-lite/gstreamer/gst/gst_private.h:45,
                         from ../../../gstreamer-lite/gstreamer/gst/gstclock.c:104:
        /usr/include/glib-2.0/gobject/gobject.h:849:43: note: expected 'GWeakRef *' but argument is of type 'GWeakRef **'
          849 | void g_weak_ref_init (GWeakRef *weak_ref,
              | ~~~~~~~~~~^~~~~~~~

              almatvee Alexander Matveev
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: