Changes between Initial Version and Version 1 of Ticket #9859
- Timestamp:
- Aug 3, 2022, 5:59:01 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9859 – Description
initial v1 1 1 While compiling ffmpeg (commit 1368b5a) with emscripten 3.1.17, there are two warnings, I thinks maintainers might want to look into: 2 2 3 ``` 3 {{{ 4 4 fftools/ffmpeg.c:339:41: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma] 5 5 static atomic_int transcode_init_done = ATOMIC_VAR_INIT(0); … … 8 8 #pragma clang deprecated(ATOMIC_VAR_INIT) 9 9 ^ 10 ``` 10 }}} 11 11 12 12 To my knowledge, this macro was a part of early draft design for C11 atomic types. It is not needed in C11, and is deprecated in C17 and removed in C23. … … 14 14 The other warning is also interesting: 15 15 16 ``` 16 {{{ 17 17 fftools/ffmpeg_filter.c:898:35: warning: floating-point comparison is always true; constant cannot be represented exactly in type 'float' [-Wliteral-range] 18 18 if (audio_drift_threshold != 0.1) 19 19 ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~ 20 ``` 20 }}} 21 21 22 22 It turns out that 0.1 is one of the numbers that it is impossible to encode in binary floating point. And according to the message the condition is as good as having `if(true)` in place. Consider using epsilon: 23 23 24 ``` 24 {{{ 25 25 if (abs(audio_drift_threshold - 0.1) < epsilon) 26 ``` 26 }}} 27 27 28 28 The SO helped me with some information https://stackoverflow.com/questions/73203857/ffmpeg-compilation-warnings-atomic-var-init


