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>
Unified · Split
| @@ -1574,7 +1574,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, · 1573 unmodified lines | ||
| 1574 | 1574 | } |
| 1575 | 1575 | } |
| 1576 | 1576 | |
| 1577 | −#define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS) | |
| 1577 | +#if HAVE_MMAP && HAVE_MPROTECT && defined(MAP_ANONYMOUS) | |
| 1578 | +#define USE_MMAP 1 | |
| 1579 | +#else | |
| 1580 | +#define USE_MMAP 0 | |
| 1581 | +#endif | |
| 1578 | 1582 | |
| 1579 | 1583 | /* precalculate horizontal scaler filter coefficients */ |
| 1580 | 1584 | { |