summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Strachan2017-03-06 19:11:43 -0600
committerJesse Hall2017-04-14 17:12:06 -0500
commit5bebf84845bbe1fd7fa9b12592589b443b3615a2 (patch)
tree2cec75911623d76be5c1b19c6f53330db2a12919
parent54cd7e0d2c874f962b63c7a06ea58c97686465fc (diff)
downloadplatform-system-core-5bebf84845bbe1fd7fa9b12592589b443b3615a2.tar.gz
platform-system-core-5bebf84845bbe1fd7fa9b12592589b443b3615a2.tar.xz
platform-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
-rw-r--r--libsync/include/ndk/sync.h3
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);
69 * The returned array is owned by the parent sync file info, and has 69 * The returned array is owned by the parent sync file info, and has
70 * info->num_fences entries. 70 * info->num_fences entries.
71 */ 71 */
72inline struct sync_fence_info *sync_get_fence_info( 72static inline struct sync_fence_info* sync_get_fence_info(const struct sync_file_info* info) {
73 const struct sync_file_info *info) {
74// This header should compile in C, but some C++ projects enable 73// This header should compile in C, but some C++ projects enable
75// warnings-as-error for C-style casts. 74// warnings-as-error for C-style casts.
76#pragma GCC diagnostic push 75#pragma GCC diagnostic push