chromium/chromium-88-vaapi-attribute.patch
Tom spot Callaway 2849f0ee66 87.0.4280.66
2020-11-18 11:37:11 -05:00

40 lines
1.6 KiB
Diff

From 4f4604877f3b666ac7a373ae443e3c3795424569 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 6 Nov 2020 11:18:42 +0000
Subject: [PATCH] GCC: fix attribute on function definition
GCC does not accept attributes at the end for function definitions.
Solution is to move it before function name. Otherwise GCC fails like
this:
../../base/compiler_specific.h:97:28: error: attributes are not allowed
on a function-definition
97 | #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
| ^~~~~~~~~~~~~
../../media/gpu/vaapi/vaapi_wrapper.h:322:36: note: in
expansion of macro 'WARN_UNUSED_RESULT'
322 | const T* data) WARN_UNUSED_RESULT {
| ^~~~~~~~~~~~~~~~~~
---
media/gpu/vaapi/vaapi_wrapper.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
index fd1fd82..deeda1f 100644
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -318,8 +318,8 @@ class MEDIA_GPU_EXPORT VaapiWrapper
// Convenient templatized version of SubmitBuffer() where |size| is deduced to
// be the size of the type of |*data|.
template <typename T>
- bool SubmitBuffer(VABufferType va_buffer_type,
- const T* data) WARN_UNUSED_RESULT {
+ bool WARN_UNUSED_RESULT SubmitBuffer(VABufferType va_buffer_type,
+ const T* data) {
return SubmitBuffer(va_buffer_type, sizeof(T), data);
}
// Batch-version of SubmitBuffer(), where the lock for accessing libva is
--
2.26.2