summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-17 18:44:43 -0400
committerBen Gamari <ben@smart-cactus.org>2020-09-18 08:31:56 -0400
commit4ffa7d4047a7034143c13d65fe17deabf09b6c96 (patch)
tree8cc398efc00670f40c3d6dbc519bb5daae45c953
parent4e00ee7b9c1da4ee687673309a154c9718437473 (diff)
downloadhaskell-4ffa7d4047a7034143c13d65fe17deabf09b6c96.tar.gz
rts: Drop field initializer on thread_basic_info_data_t
This struct has a number of fields and we only care that the value is initialized with zeros. This eliminates the warnings noted in #17905. (cherry picked from commit 09b91e8b95eb16fe72aef8405896fd6caf789f61)
-rw-r--r--rts/posix/GetTime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/posix/GetTime.c b/rts/posix/GetTime.c
index 602bd17b52..0128e3bc8b 100644
--- a/rts/posix/GetTime.c
+++ b/rts/posix/GetTime.c
@@ -71,7 +71,7 @@ Time getCurrentThreadCPUTime(void)
// support clock_getcpuclockid. Hence we prefer to use the Darwin-specific
// path on Darwin, even if clock_gettime is available.
#if defined(darwin_HOST_OS)
- thread_basic_info_data_t info = { 0 };
+ thread_basic_info_data_t info = { };
mach_msg_type_number_t info_count = THREAD_BASIC_INFO_COUNT;
kern_return_t kern_err = thread_info(mach_thread_self(), THREAD_BASIC_INFO,
(thread_info_t) &info, &info_count);