ffmpeg | branch: release/3.4 | Mark Harris <mark....@gmail.com> | Sat Nov 24 
13:02:02 2018 -0800| [29362d5f9a4cc99a783e6c0e362644219e61bb89] | committer: 
James Almer

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 <mich...@niedermayer.cc>
(cherry picked from commit 4361293fcf59edb56879c36edcd25f0a91e0edf8)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29362d5f9a4cc99a783e6c0e362644219e61bb89
---

 libavutil/mem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/mem.h b/libavutil/mem.h
index 527cd03191..d6f9c81549 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -338,7 +338,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.

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to