[Bug 774293] msvc: fix some warnings, disable others

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Nov 15 01:23:55 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=774293

--- Comment #23 from Scott D Phillips <scott.d.phillips at intel.com> ---
(In reply to Sebastian Dröge (slomo) from comment #20)
> (In reply to Tim-Philipp Müller from comment #17)
> > With gcc g_once_init_{enter,leave} is just a macro and there's a (gpointer)
> > cast which makes the const go away.
> 
> Indeed. Too bad there are no casts that preserve the const'ness of the
> argument.
> 
> Having the pointer passed there const seems like a bug though, the value is
> not const but written to by g_once_init_leave().

Digging into this more, it seems there's actually not a cast in gthread.h but
just some static assert type stuff about what is passed in.

What seems to be going on is that there are different sets of rules for
qualified pointer conversion in C and C++. The  places that MSVC warns about
seem to be OK by the C++ rules but not by the C rules. MSVC has the separate
rule sets the two languages whereas gcc and clang just use the C++ rules for
both languages. This is just an armchair linguist's conclusion though, so
caveat lector.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list