[vlc-devel] [PATCH] test: iosvlc: fix -fobjc-arc
Marvin Scholz
epirat07 at gmail.com
Sun Feb 7 11:26:44 UTC 2021
LGTM
On 7 Feb 2021, at 10:24, Alexandre Janniaux wrote:
> The -fobjc-arc was defined on CFLAGS whereas the only file compiled is
> an objective-C file, thus it was unused. With the flag moved to
> OBJCFLAGS, ARC is breaking the compilation because of a missing
> __bridge cast.
> ---
> test/Makefile.am | 2 +-
> test/iosvlc.m | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/test/Makefile.am b/test/Makefile.am
> index 54666fdc85..779c6a89a1 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -295,7 +295,7 @@ endif
> vlc_ios_SOURCES = iosvlc.m
> vlc_ios_LDFLAGS = $(LDFLAGS_vlc)
> -Wl,-framework,Foundation,-framework,UIKit
> vlc_ios_LDFLAGS += -Xlinker -rpath -Xlinker "$(libdir)"
> -vlc_ios_CFLAGS = -fobjc-arc
> +vlc_ios_OBJCFLAGS = -fobjc-arc
> vlc_ios_LDADD = ../lib/libvlc.la ../src/libvlccore.la
> if HAVE_IOS
> noinst_PROGRAMS += vlc-ios
> diff --git a/test/iosvlc.m b/test/iosvlc.m
> index 2752e5dc7b..fc73205c67 100644
> --- a/test/iosvlc.m
> +++ b/test/iosvlc.m
> @@ -92,7 +92,8 @@ static int Open(vlc_object_t *obj)
> {
> AppDelegate *d = (AppDelegate *)[[UIApplication
> sharedApplication] delegate];
> assert(d != nil && d->window != nil);
> - var_SetAddress(vlc_object_instance(obj), "drawable-nsobject",
> d->window);
> + var_SetAddress(vlc_object_instance(obj), "drawable-nsobject",
> + (__bridge void *)d->window);
>
> return VLC_SUCCESS;
> }
> --
> 2.30.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list