[vlc-devel] [PATCH v2] package/win32: build.sh: trigger build errors on dubious pointer use

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 18 09:57:13 CET 2020


On 2020-03-17 17:24, Rémi Denis-Courmont wrote:
> Le tiistaina 17. maaliskuuta 2020, 16.32.55 EET Steve Lhomme a écrit :
>>> Again *almost* every COM instantiation in the VLC code base (and in many
>>> other code bases) is an invalid pointer conversion. And it's helplessly
>>> muted by an explicit but invalid cast to void **.
>>
>> I am not advocating to remove all casts from the code. Sometimes it's
>> useful. I'm talking about pointers that are simply from incompatible
>> types (incompatible-pointer-types) that cannot be casted away without
>> breaking things.
> 
> And I'm saying that those warnings are better be left as warnings, because
> otherwise they will cause build failures for harmless or mostly harmless
> matters, *and* they will create an extra incentive to make wrong casts,
> exactly like COM already shows how NOT to do.

You're still talking about a different type of pointer issues that can 
be solved with casting. (and that will be silenced anyway since we tend 
to do commits to suppress warnings)

> And that's what was decided already.

I wasn't aware of that.


More information about the vlc-devel mailing list