diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2017-08-24 23:04:13 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-08-28 11:26:14 +0300 |
commit | 5e3f6dc70198426fe0741e3017826b8bf3ee5ad8 (patch) | |
tree | b7849778409688e67908af6c3d0a41f2d3caefcf /libswscale/utils.c | |
parent | 29ba1e60761fff569fb348fb776eec4ece05a07e (diff) |
swscale: 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>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 6b17955f54..786774f241 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1098,7 +1098,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 */ { |