[Git][ghc/ghc][wip/T17905] rts: Drop field initializer on thread_basic_info_data_t

Ben Gamari gitlab at gitlab.haskell.org
Thu Sep 17 22:46:26 UTC 2020



Ben Gamari pushed to branch wip/T17905 at Glasgow Haskell Compiler / GHC


Commits:
09b91e8b by Ben Gamari at 2020-09-17T18:46:19-04:00
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.

- - - - -


1 changed file:

- rts/posix/GetTime.c


Changes:

=====================================
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);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/09b91e8b95eb16fe72aef8405896fd6caf789f61

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/09b91e8b95eb16fe72aef8405896fd6caf789f61
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200917/65567401/attachment-0001.html>


More information about the ghc-commits mailing list