[FFmpeg-cvslog] avutil/audio_fifo: add av_warn_unused_result

Ganesh Ajjanagadde git at videolan.org
Thu Oct 29 04:07:46 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 15 19:24:14 2015 -0400| [dd367495578d406ab6456fca7e2a0c4a5bc50b0a] | committer: Ganesh Ajjanagadde

avutil/audio_fifo: add av_warn_unused_result

This one should not trigger any warnings, but will be useful for future
robustness.

Strictly speaking, one could check the size after the call by examining
the structure instead of the return value. Such a use case is highly
unusual, and this commit may be easily reverted if there is a legitimate
need of such use.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd367495578d406ab6456fca7e2a0c4a5bc50b0a
---

 libavutil/audio_fifo.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/audio_fifo.h b/libavutil/audio_fifo.h
index d93be2a..24f91da 100644
--- a/libavutil/audio_fifo.h
+++ b/libavutil/audio_fifo.h
@@ -73,6 +73,7 @@ AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
  * @param nb_samples  new allocation size, in samples
  * @return            0 if OK, or negative AVERROR code on failure
  */
+av_warn_unused_result
 int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
 
 /**



More information about the ffmpeg-cvslog mailing list