diff options
author | Mark Harris <mark.hsj@gmail.com> | 2018-11-24 13:02:02 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-11-26 23:47:29 +0100 |
commit | 4361293fcf59edb56879c36edcd25f0a91e0edf8 (patch) | |
tree | aa6ee0367e21aa21f2737bb109b5ec6ee1a7de4c | |
parent | 8108064043bfb98cbc5a5bab9da4229be5f6e846 (diff) | |
download | ffmpeg-4361293fcf59edb56879c36edcd25f0a91e0edf8.tar.gz |
avutil/mem: Fix invalid use of av_alloc_size
The alloc_size attribute is valid only on functions that return a
pointer. GCC 9 (not yet released) warns about invalid usage:
./libavutil/mem.h:342:1: warning: 'alloc_size' attribute ignored on a function returning int' [-Wattributes]
342 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
| ^~~~~~~~~~~~~
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/mem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h index 55ae573ac9..5fb1a02dd9 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -339,7 +339,7 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size) * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be * correctly aligned. */ -av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size); +int av_reallocp_array(void *ptr, size_t nmemb, size_t size); /** * Reallocate the given buffer if it is not large enough, otherwise do nothing. |