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

Rémi Denis-Courmont remi at remlab.net
Thu Oct 3 14:06:54 CEST 2019

This is as bad, if not worse, in the win32 script that in the common configure.

Besides, Windows has in-built incorrect pointer types, so that's making sure it won't work. E.g. haphazardly using char or uchar instead of void for binary I/O functions.

Le 3 octobre 2019 09:06:09 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>And on missing field initializers in structures.
>Mismatching pointers are usually a result of using the incorrect
>pointer and
>might trigger crashes.
>Missing initializers are useful for structures of callbacks, to make
>sure a new
>callback is not missing by accident. It's always possible to put NULL,
>purpose, knowingly.
>Both flags produce no error on win32/win64 with clang or gcc.
> extras/package/win32/build.sh | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>diff --git a/extras/package/win32/build.sh
>index 5c1c7809900..38d4ecb1469 100755
>--- a/extras/package/win32/build.sh
>+++ b/extras/package/win32/build.sh
>@@ -168,7 +168,9 @@ if [ ! -z "$WITH_PDB" ]; then
>     CONFIGFLAGS="$CONFIGFLAGS --enable-pdb"
> fi
>-../extras/package/win32/configure.sh --host=$TRIPLET $CONFIGFLAGS
>+../extras/package/win32/configure.sh --host=$TRIPLET $CONFIGFLAGS \
>+    CFLAGS="$CFLAGS -Werror=incompatible-pointer-types
>-Werror=missing-field-initializers" \
>+    CXXFLAGS="$CXXFLAGS -Werror=incompatible-pointer-types
> info "Compiling"
> make -j$JOBS
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:

Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191003/bd9d89d7/attachment.html>

More information about the vlc-devel mailing list