diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-10-03 00:32:26 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-10-04 16:36:27 +0200 |
commit | 719b4eef5db7c2452229b4a801722281d5f5f874 (patch) | |
tree | 41a0caa7b1345295221f0924e0b4da2384bd3e58 | |
parent | 9d8e8495c9d733dd9004b26da9c73fddba7c14e5 (diff) | |
download | ffmpeg-719b4eef5db7c2452229b4a801722281d5f5f874.tar.gz |
lavu/common: add warning to GET_UTF8 doxy
Should prevent wrong uses, or at least decrease their chance.
-rw-r--r-- | libavutil/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 9f0f998682..b1203ad5a2 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -295,6 +295,11 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x) * input, this could be *ptr++. * @param ERROR Expression to be evaluated on invalid input, * typically a goto statement. + * + * @warning ERROR should not contain a loop control statement which + * could interact with the internal while loop, and should force an + * exit from the macro code (e.g. through a goto or a return) in order + * to prevent undefined results. */ #define GET_UTF8(val, GET_BYTE, ERROR)\ val= GET_BYTE;\ |