Fix -WMissing-braces compile warning on android
PATCH 1/1 Fix -WMissing-braces compile warning on android
use "{}" instead of "{0}" in empty struct defination to avoid missing-braces warning:
suggest braces around initialization of subobject [-Wmissing-braces]
Test: compilation on android with this warning free
Signed-off-by Jenny Cao <[email protected]>
--- amdgpu/amdgpu_cs.c | 4 ++-- libsync.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
amdgpu/amdgpu_cs.c +2 -2
@@ -705,7 +705,7 @@ int amdgpu_cs_submit_raw(amdgpu_device_handle dev,struct drm_amdgpu_cs_chunk *chunks, uint64_t *seq_no) { - union drm_amdgpu_cs cs = {0}; + union drm_amdgpu_cs cs = {};uint64_t *chunk_array;int i, r;if (num_chunks ==0 )
@@ -750,7 +750,7 @@ int amdgpu_cs_fence_to_handle(amdgpu_device_handle dev,uint32_t what, uint32_t *out_handle) { - union drm_amdgpu_fence_to_handle fth = {0}; + union drm_amdgpu_fence_to_handle fth = {};int r; fth.in.fence.ctx_id = fence->context->id;
libsync.h +1 -1
@@ -85,7 +85,7 @@ static inline int sync_wait(int fd, int timeout)static inline int sync_merge (const char *name,int fd1,int fd2) { -struct sync_merge_data data = {0 }; +struct sync_merge_data data = {};int ret; data.fd2 = fd2;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel