History

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>

Derek Buitenhuis committed 9 years ago

Commit add7b3b1 parent 9e02f351 file · +5 −1Browse files

Unified · Split

libswscale/utils.c+5−1
@@ -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 /* precalculate horizontal scaler filter coefficients */1583 /* precalculate horizontal scaler filter coefficients */
1580 {1584 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t