From: Ganesh Ajjanagadde Date: Thu, 15 Oct 2015 21:38:03 +0000 (-0400) Subject: avutil/mem: add av_warn_unused_result X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=cf52ae003b427fbecdf82b7e99b829ccb299a0f4;p=ffmpeg avutil/mem: add av_warn_unused_result This adds av_warn_unused_result to functions whose return codes need to be checked. Reviewed-by: Michael Niedermayer Signed-off-by: Ganesh Ajjanagadde --- diff --git a/libavutil/mem.h b/libavutil/mem.h index 2a1e36d69fb..a8eb14ee0f6 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -144,6 +144,7 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize); * The situation is undefined according to POSIX and may crash with * some libc implementations. */ +av_warn_unused_result int av_reallocp(void *ptr, size_t size); /** @@ -304,6 +305,7 @@ void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem); * @return >=0 on success, negative otherwise. * @see av_dynarray_add(), av_dynarray2_add() */ +av_warn_unused_result int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem); /**