avutil/mem: Fix invalid use of av_alloc_size
authorMark Harris <mark.hsj@gmail.com>
Sat, 24 Nov 2018 21:02:02 +0000 (13:02 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 26 Nov 2018 22:47:29 +0000 (23:47 +0100)
commit4361293fcf59edb56879c36edcd25f0a91e0edf8
treeaa6ee0367e21aa21f2737bb109b5ec6ee1a7de4c
parent8108064043bfb98cbc5a5bab9da4229be5f6e846
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>
libavutil/mem.h