[FFmpeg-devel] [PATCH] avformat/avio_internal: add av_warn_unused_result to ffio_ensure_seekback

Michael Niedermayer michael at niedermayer.cc
Sun Nov 15 21:04:10 CET 2015


On Sun, Nov 15, 2015 at 01:13:43PM -0500, Ganesh Ajjanagadde wrote:
> This will trigger a few warnings that need to be fixed, as this function
> can return AVERROR(ENOMEM).
> 
> --------------------------------------------------------------
> Inspired by a patch sent by Paul for the IVR demuxer.
> 
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavformat/avio_internal.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
> index ad50567..655f38a 100644
> --- a/libavformat/avio_internal.h
> +++ b/libavformat/avio_internal.h
> @@ -102,6 +102,7 @@ int ffio_set_buf_size(AVIOContext *s, int buf_size);
>   * within the current pos and pos+buf_size is possible.
>   * Once the stream position moves outside this window this guarantee is lost.
>   */
> +av_warn_unused_result
>  int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size);

LGTM

(would be ideal to fix the cases that would result in warnings before
 pushing this)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- 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/20151115/cbc64ce7/attachment.sig>


More information about the ffmpeg-devel mailing list