[FFmpeg-devel] [PATCH 4/4] avutil/eval: add av_warn_unused_result

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sat Oct 31 15:47:57 CET 2015


These functions do mallocs that can fail and return AVERROR(ENOMEM) that
needs to be checked.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavutil/eval.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/eval.h b/libavutil/eval.h
index 6159b0f..d65fef1 100644
--- a/libavutil/eval.h
+++ b/libavutil/eval.h
@@ -48,6 +48,7 @@ typedef struct AVExpr AVExpr;
  * @return >= 0 in case of success, a negative value corresponding to an
  * AVERROR code otherwise
  */
+av_warn_unused_result
 int av_expr_parse_and_eval(double *res, const char *s,
                            const char * const *const_names, const double *const_values,
                            const char * const *func1_names, double (* const *funcs1)(void *, double),
@@ -71,6 +72,7 @@ int av_expr_parse_and_eval(double *res, const char *s,
  * @return >= 0 in case of success, a negative value corresponding to an
  * AVERROR code otherwise
  */
+av_warn_unused_result
 int av_expr_parse(AVExpr **expr, const char *s,
                   const char * const *const_names,
                   const char * const *func1_names, double (* const *funcs1)(void *, double),
-- 
2.6.2



More information about the ffmpeg-devel mailing list