utils: Do not expand a macro with 'defined' in it

Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
pull/269/head
Derek Buitenhuis 7 years ago
parent 9e02f35f6a
commit add7b3bc3f
  1. 6
      libswscale/utils.c

@ -1574,7 +1574,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
}
}
#define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
#if HAVE_MMAP && HAVE_MPROTECT && defined(MAP_ANONYMOUS)
#define USE_MMAP 1
#else
#define USE_MMAP 0
#endif
/* precalculate horizontal scaler filter coefficients */
{

Loading…
Cancel
Save