openwebrtc-gst-plugins icon indicating copy to clipboard operation
openwebrtc-gst-plugins copied to clipboard

Build error with clang

Open ossy-szeged opened this issue 9 years ago • 1 comments

We build openwebrtc-gst-plugins in WebKit project with jhbuild and got the following build error:

In file included from gstvideorepair.c:30: In file included from ./gstvideorepair.h:29: In file included from /home/webkit/WebKit/WebKitBuild/DependenciesEFL/Root/include/gstreamer-1.0/gst/gst.h:88: /home/webkit/WebKit/WebKitBuild/DependenciesEFL/Root/include/gstreamer-1.0/gst/gstcompat.h:54:38: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((((GstPad_)(pad))->direction) == GST_PAD_SRC)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /home/webkit/WebKit/WebKitBuild/DependenciesEFL/Root/include/gstreamer-1.0/gst/gstcompat.h:54:38: note: remove extraneous parentheses around the comparison to silence this warning if (((((GstPad_)(pad))->direction) == GST_PAD_SRC)) ~ ^ ~ /home/webkit/WebKit/WebKitBuild/DependenciesEFL/Root/include/gstreamer-1.0/gst/gstcompat.h:54:38: note: use '=' to turn this equality comparison into an assignment if (((((GstPad*)(pad))->direction) == GST_PAD_SRC)) ^~ = 1 error generated.


line54: if (GST_PAD_IS_SRC (pad))

Of course this warning can be silenced in gstreamer with fixing this line, but "if GST_PAD_IS_SRC (pad)" would be very ugly. Additionally Wparentheses-equality isn't a useful warning at all, it would be better to simply suppress it.

I'm going to suppress this warning in WebKit - https://bugs.webkit.org/show_bug.cgi?id=145837, but it would be great if we can fix it in the upstream too.

ossy-szeged avatar Jun 26 '15 14:06 ossy-szeged

#45 wasn't accepted and I don't have time to find better fix, feel free to pick it up, if anybody else is interested in fixing this issue.

ossy-szeged avatar Sep 24 '15 10:09 ossy-szeged