After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791128 - C runtime complains about bad arguments on each g_log() call
C runtime complains about bad arguments on each g_log() call
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-12-02 13:15 UTC by LRN
Modified: 2017-12-03 03:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a 32-bit time_t cast (1.02 KB, patch)
2017-12-02 13:15 UTC, LRN
committed Details | Review

Description LRN 2017-12-02 13:15:27 UTC
Every time glib logs something, there's an "Invalid parameter passed to
C runtime function" message in the console.
Comment 1 LRN 2017-12-02 13:15:35 UTC
Created attachment 364807 [details] [review]
Fix a 32-bit time_t cast

Divide first, *then* cast. Otherwise a very long "now", which is
64-bit, gets truncated into a 32-bit time_t, which can't hold the
value, and turns negative more often than not.
Comment 2 Colin Walters 2017-12-02 20:14:52 UTC
Review of attachment 364807 [details] [review]:

LGTM.
Comment 3 LRN 2017-12-03 03:08:18 UTC
Attachment 364807 [details] pushed as 69ea026 - Fix a 32-bit time_t cast