[FFmpeg-devel] [PATCH] avutil/audio_fifo: add av_warn_unused_result
Michael Niedermayer
michael at niedermayer.cc
Fri Oct 16 17:44:12 CEST 2015
On Thu, Oct 15, 2015 at 07:26:04PM -0400, Ganesh Ajjanagadde wrote:
> This one should not trigger any warnings, but will be useful for future
> robustness.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> 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);
probably ok
strictly speaking one could check the size after the call instead of
the returb value i think
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151016/3234cdc5/attachment.sig>
More information about the ffmpeg-devel
mailing list