diff options
author | Alistair Strachan <alistair.strachan@imgtec.com> | 2017-03-06 17:11:43 -0800 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2017-04-14 15:12:06 -0700 |
commit | 5bebf84845bbe1fd7fa9b12592589b443b3615a2 (patch) | |
tree | 2cec75911623d76be5c1b19c6f53330db2a12919 /libsync | |
parent | 54cd7e0d2c874f962b63c7a06ea58c97686465fc (diff) | |
download | system_core-5bebf84845bbe1fd7fa9b12592589b443b3615a2.tar.gz system_core-5bebf84845bbe1fd7fa9b12592589b443b3615a2.tar.bz2 system_core-5bebf84845bbe1fd7fa9b12592589b443b3615a2.zip |
libsync: ndk: Fix compilation in C mode.
Use of 'inline' without 'static' may allow the C compiler to uninline it
within the compilation unit, depending on the C standard level. Always
using 'static inline' avoids this problem.
Test: build + boot to launcher
Change-Id: Ifb6e1fa6b84286067ddc2daca4c8942c410e56ab
Diffstat (limited to 'libsync')
-rw-r--r-- | libsync/include/ndk/sync.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libsync/include/ndk/sync.h b/libsync/include/ndk/sync.h index 758a10623..3c5578313 100644 --- a/libsync/include/ndk/sync.h +++ b/libsync/include/ndk/sync.h @@ -69,8 +69,7 @@ struct sync_file_info *sync_file_info(int32_t fd); * The returned array is owned by the parent sync file info, and has * info->num_fences entries. */ -inline struct sync_fence_info *sync_get_fence_info( - const struct sync_file_info *info) { +static inline struct sync_fence_info* sync_get_fence_info(const struct sync_file_info* info) { // This header should compile in C, but some C++ projects enable // warnings-as-error for C-style casts. #pragma GCC diagnostic push |