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

Jean-Baptiste Kempf jb at videolan.org
Tue Mar 17 16:56:36 CET 2020


Hello Steve,

I would suggest an extra-flag to the build script to use that, like -d

Best,

On Tue, Mar 17, 2020, at 12:02, Steve Lhomme wrote:
> 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, on
> purpose, knowingly.
> 
> Both flags produce no error on win32/win64 with clang or gcc.
> 
> I have been compiling with these flags for weeks without issues. It helped find
> some issue (48442d3536edae578f1a384e73346d1e2a4c0061) that were pushed
> unnoticed without these checks.
> ---
>  extras/package/win32/build.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
> index 8805a08b2eb..d1035f1b543 100755
> --- a/extras/package/win32/build.sh
> +++ b/extras/package/win32/build.sh
> @@ -210,7 +210,8 @@ if [ ! -z "$WITH_PDB" ]; then
>      CONFIGFLAGS="$CONFIGFLAGS --enable-pdb"
>  fi
>  
> -${SCRIPT_PATH}/configure.sh --host=$TRIPLET 
> --with-contrib=../contrib/$TRIPLET $CONFIGFLAGS
> +${SCRIPT_PATH}/configure.sh --host=$TRIPLET 
> --with-contrib=../contrib/$TRIPLET $CONFIGFLAGS \
> +    CFLAGS="$CFLAGS -g -Werror=incompatible-pointer-types 
> -Werror=missing-field-initializers"
>  
>  info "Compiling"
>  make -j$JOBS
> -- 
> 2.17.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list