Strict aliasing warning when compiling with glib-2.0 version2.30.2
Qais Yousef
Qais.Yousef at imgtec.com
Wed Apr 25 09:22:34 PDT 2012
> -----Original Message-----
> From: gstreamer-openmax-
> bounces+qais.yousef=imgtec.com at lists.freedesktop.org
[mailto:gstreamer-
> openmax-bounces+qais.yousef=imgtec.com at lists.freedesktop.org] On
> Behalf Of Felipe Contreras
> Sent: 25 April 2012 17:12
> To: Discussions and patches concerning gst-openmax
> Subject: Re: Strict aliasing warning when compiling with glib-2.0
version2.30.2
>
> On Wed, Apr 25, 2012 at 2:48 PM, Qais Yousef <Qais.Yousef at imgtec.com>
> wrote:
>
> > I am getting the following warnings when compiling:
> >
> > gstomx_base_filter.c: In function 'output_loop':
> > gstomx_base_filter.c:331: warning: dereferencing type-punned pointer
> > will break strict-aliasing rules
> > gstomx_base_filter.c: In function 'activate_push':
> > gstomx_base_filter.c:789: warning: dereferencing type-punned pointer
> > will break strict-aliasing rules
> > gstomx_base_filter.c:805: warning: dereferencing type-punned pointer
> > will break strict-aliasing rules
> >
> > Did anyone see them before? Are they similar to the warnings caused
by
> > compiling with glib-2.0 < 2.19.8?
>
> I don't think that's a problem... They are just warnings. The fix is
probably
> simple, and if you can come up with a patch to fix them it would be
> appreciated. But I don't think the end result would be any different.
>
> If your compilation fails, you can try disabling erroring on warnings.
>
> Cheers.
No they aren't a problem. I just wanted to make sure the cause of the
warnings is the mentioned reason. I have a fix (attached).
Generally strict-aliasing warnings scare me. If things go wrong, they
could produce subtle runtime errors. I've seen one case of this.
Cheers,
Qais
> --
> Felipe Contreras
> _______________________________________________
> gstreamer-openmax mailing list
> gstreamer-openmax at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-openmax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-openmax-0.10.1-glib-2.0-v2.30.2-strict-aliasing-fix.patch
Type: application/octet-stream
Size: 564 bytes
Desc: gst-openmax-0.10.1-glib-2.0-v2.30.2-strict-aliasing-fix.patch
URL: <http://lists.freedesktop.org/archives/gstreamer-openmax/attachments/20120425/e468507b/attachment.obj>
More information about the gstreamer-openmax
mailing list