Commit d8f178c1 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Chromium LUCI CQ

GCC: move attribute to the start of function definition in VAAPI wrapper.

Fix compilation error:
../../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 {
      |                                    ^~~~~~~~~~~~~~~~~~

Bug: 819294
Change-Id: I24e2e10a96182f8705fed96164550357acdb55a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534931
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831923}
parent 27d6f659
...@@ -345,8 +345,8 @@ class MEDIA_GPU_EXPORT VaapiWrapper ...@@ -345,8 +345,8 @@ class MEDIA_GPU_EXPORT VaapiWrapper
// Convenient templatized version of SubmitBuffer() where |size| is deduced to // Convenient templatized version of SubmitBuffer() where |size| is deduced to
// be the size of the type of |*data|. // be the size of the type of |*data|.
template <typename T> template <typename T>
bool SubmitBuffer(VABufferType va_buffer_type, bool WARN_UNUSED_RESULT SubmitBuffer(VABufferType va_buffer_type,
const T* data) WARN_UNUSED_RESULT { const T* data) {
return SubmitBuffer(va_buffer_type, sizeof(T), data); return SubmitBuffer(va_buffer_type, sizeof(T), data);
} }
// Batch-version of SubmitBuffer(), where the lock for accessing libva is // Batch-version of SubmitBuffer(), where the lock for accessing libva is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment