[FFmpeg-devel] [PATCH] avutil/attributes: add av_warn_unused_result
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 5 19:42:38 CEST 2015
On Mon, Oct 05, 2015 at 01:45:12AM -0400, Ganesh Ajjanagadde wrote:
> GCC 3.4 introduced an attribute warn_unused_result to warn when a programmer
> discards the return value. Applying this judiciously across the codebase can help
> in fixing a lot of problems. At a high level, functions which return error codes
> should always be checked. More concretely, consider the functions ff_add_format
> and the like in avfilter/formats.h. A quick examination shows that a large portion
> of libavfilter fails to handle the associated errors, usually AVERROR(ENOMEM).
> The above example was where I observed the utility of this, but it should be
> useful in many places across the code base.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libavutil/attributes.h | 6 ++++++
> 1 file changed, 6 insertions(+)
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20151005/dcc8d0d7/attachment.sig>
More information about the ffmpeg-devel
mailing list