GNOME Bugzilla – Bug 795765
[base] Compilation fails on GCC 8.0.1
Last modified: 2018-11-03 12:06:50 UTC
gstreamer (master) heads/master-0-g98200ddd8dfd gst-plugins-base (master) heads/master-0-gdbd9ff1cf510 With GCC 8.0.1 (default on recent Fedora 28 release), gst-plugins-base fails to compile: video-chroma.c: In function 'video_chroma_up_v2_u16': video-chroma.c:360:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict] MAKE_UPSAMPLE_V2 (u16, guint16); ^~~~~~~~~~~~~~~~ video-chroma.c:360:1: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict] video-chroma.c: In function 'video_chroma_up_v2_u8': video-chroma.c:361:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict] MAKE_UPSAMPLE_V2 (u8, guint8); ^~~~~~~~~~~~~~~~ video-chroma.c:361:1: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict] video-chroma.c: In function 'video_chroma_down_h2_u8': video-chroma.c:365:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict] MAKE_DOWNSAMPLE_H2_ORC (u8, guint8); ^~~~~~~~~~~~~~~~~~~~~~ video-chroma.c: In function 'video_chroma_down_v2_u16': video-chroma.c:366:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict] MAKE_DOWNSAMPLE_V2 (u16, guint16); ^~~~~~~~~~~~~~~~~~ video-chroma.c: In function 'video_chroma_down_v2_u8': video-chroma.c:367:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict] MAKE_DOWNSAMPLE_V2 (u8, guint8); ^~~~~~~~~~~~~~~~~~ video-chroma.c: In function 'video_chroma_down_v4_u16': video-chroma.c:551:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict] MAKE_DOWNSAMPLE_V4 (u16, guint16); ^~~~~~~~~~~~~~~~~~ video-chroma.c: In function 'video_chroma_down_v4_u8': video-chroma.c:552:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict] MAKE_DOWNSAMPLE_V4 (u8, guint8); ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[5]: *** [Makefile:998: libgstvideo_1.0_la-video-chroma.lo] Error 1 Can workaround with --disable-fatal-warnings.
This looks like a real problem, wrong usage of restrict.
Created attachment 371657 [details] [review] video: Silence "restrict" issues with ORC code The problem is that even though the functions we are calling are in-place transformation, orc automatically puts the restrict keyword on all arguments. To silence that warning just create yet-another variable containing the same value.
Comment on attachment 371657 [details] [review] video: Silence "restrict" issues with ORC code Get this is but leave the bug open. This only hides the warning for now because gcc is too stupid to see that this is equally broken
Comment on attachment 371657 [details] [review] video: Silence "restrict" issues with ORC code I'll also backport it to 1.14 commit 1a1570bb1e388022e5f9819931c2edfa50440f25 (HEAD -> master, origin/master, origin/HEAD) Author: Edward Hervey <edward@centricular.com> Date: Fri May 4 10:35:36 2018 +0200 video: Silence "restrict" issues with ORC code The problem is that even though the functions we are calling are in-place transformation, orc automatically puts the restrict keyword on all arguments. To silence that warning just create yet-another variable containing the same value. https://bugzilla.gnome.org/show_bug.cgi?id=795765
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/449.