[FFmpeg-devel] [PATCH] avutil/mem: Fix invalid use of av_alloc_size

Michael Niedermayer michael at niedermayer.cc
Mon Nov 26 03:01:00 EET 2018


On Sat, Nov 24, 2018 at 01:02:02PM -0800, Mark Harris wrote:
> 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);
>       | ^~~~~~~~~~~~~

Is the attribute also useless on all other compilers ?

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181126/b8bf33f1/attachment.sig>


More information about the ffmpeg-devel mailing list