[mythtv] fixing macOS compilation...

Piotr Oniszczuk piotr.oniszczuk at gmail.com
Tue Oct 16 08:34:14 UTC 2018



> Wiadomość napisana przez David Hampton <mythtv at love2code.net> w dniu 15.10.2018, o godz. 22:28:
> 
>> 
> 
> Hmm, that's reverting the changes I made converting the code base over
> to use the new C++11 nullptr value.  I tried running a few of those
> variable types down in the Apple developer documentation I could find,
> and it looks like all the values in the first two files are pointers of
> some sort and therefore should use nullptr.  That said, what happens if
> you use zeros in darwinavcinfo.h and darwinfirewiredevice.cpp instead
> of nullptr/NULL?
> 

David,
Changing NULL to 0 in all places in patch allows me to successfully compile.

BTW: I forgot to mention: to successful compile current master I need to add 
-Wno-aligned-allocation-unavailable to clang flags.
AFAIK aligned-allocation-unavailable is clang diagnostic msg and is an error by default.
macOS clang reports me misaligned allocation here:

nuppeldecoder.cpp:72:12: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer [-Waligned-allocation-unavailable]
    rtjd = new RTjpeg();
           ^
nuppeldecoder.cpp:72:12: note: if you supply your own aligned allocation functions, use -Wno-aligned-allocation-unavailable to silence this diagnostic
nuppeldecoder.cpp:72:12: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer [-Waligned-allocation-unavailable]
    rtjd = new RTjpeg();
           ^
nuppeldecoder.cpp:72:12: note: if you supply your own aligned allocation functions, use -Wno-aligned-allocation-unavailable to silence this diagnostic
nuppeldecoder.cpp:87:9: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer [-Waligned-allocation-unavailable]
        delete rtjd;
        ^
nuppeldecoder.cpp:87:9: note: if you supply your own aligned allocation functions, use -Wno-aligned-allocation-unavailable to silence this diagnostic
1 warning and 3 errors generated.
make[2]: *** [obj/nuppeldecoder.o] Error 1



 


More information about the mythtv-dev mailing list