[all-commits] [llvm/llvm-project] 16a5f7: [libc] Fix implict cast to time_t warning (#126947)
Michael Jones via All-commits
all-commits at lists.llvm.org
Wed Feb 12 10:08:29 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 16a5f7eb73f225544d29e613c84011f1e1ec53a4
https://github.com/llvm/llvm-project/commit/16a5f7eb73f225544d29e613c84011f1e1ec53a4
Author: Michael Jones <michaelrj at google.com>
Date: 2025-02-12 (Wed, 12 Feb 2025)
Changed paths:
M libc/src/time/time_utils.h
Log Message:
-----------
[libc] Fix implict cast to time_t warning (#126947)
On some systems time_t is 32 bit, causing build errors (with -Werror)
in get_epoch which attempts to implicitly convert an int64_t to a
time_t.
Fixes:
error: implicit conversion loses integer precision: 'int64_t' (aka 'long
long') to 'time_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
332 | return mktime_internal(timeptr);
| ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list