diff options
author | John Stebbins <[email protected]> | 2019-06-19 14:13:14 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-06-28 12:06:03 -0700 |
commit | 3e2f9fb57f48c591c2c1969a15cc9826241cfc55 (patch) | |
tree | 06d4303dedf9a07faebf1bb8c2d6da41ec2693fd /contrib/ffmpeg | |
parent | edeffe2f8f5f6c5e3a8ff3dfaf31659318ca472e (diff) |
Fix gcc 9 compiler warnings
gcc 9 is quite a lot chattier and clutters the build log with useless
information :\
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r-- | contrib/ffmpeg/A01-avutil-mem-Fix-invalid-use-of-av_alloc_size.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A01-avutil-mem-Fix-invalid-use-of-av_alloc_size.patch b/contrib/ffmpeg/A01-avutil-mem-Fix-invalid-use-of-av_alloc_size.patch new file mode 100644 index 000000000..e6fe7c191 --- /dev/null +++ b/contrib/ffmpeg/A01-avutil-mem-Fix-invalid-use-of-av_alloc_size.patch @@ -0,0 +1,33 @@ +From 4361293fcf59edb56879c36edcd25f0a91e0edf8 Mon Sep 17 00:00:00 2001 +From: Mark Harris <[email protected]> +Date: Sat, 24 Nov 2018 13:02:02 -0800 +Subject: [PATCH] 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 <[email protected]> +--- + libavutil/mem.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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. +-- +2.21.0 + |