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

Marge Bot gitlab at gitlab.haskell.org
Sat Sep 19 19:53:01 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
057db94c by Ben Gamari at 2020-09-19T15:52:56-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/057db94ce038970b14df1599fe83097c284b9c1f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/057db94ce038970b14df1599fe83097c284b9c1f
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/20200919/c28bdf65/attachment.html>


More information about the ghc-commits mailing list