aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorнаб <[email protected]>2020-05-21 21:53:13 +0200
committerBrian Behlendorf <[email protected]>2020-05-28 10:29:58 -0700
commita1ba12092744ce4da5ffb8061223cc61c9b8b4f8 (patch)
tree1c18232044b312664ffab83aa68690278e703bb9 /etc
parent6059f3a1f6950bd2aa9724ab917f2bc01343a076 (diff)
Always use "%lld" for formatting time_ts
Given the following test program: #include <time.h> #include <stdio.h> #include <stdint.h> int main() { printf("time_t: %d\n", sizeof(time_t)); printf("long: %d\n", sizeof(long)); printf("long long: %d\n", sizeof(long long)); } These are output on various x86 architectures: x32$ time_t: 8 x32$ long: 4 x32$ long long: 8 amd64$ time_t: 8 amd64$ long: 8 amd64$ long long: 8 i386$ time_t: 4 i386$ long: 4 i386$ long long: 8 Therefore code using "%l[du]" to format time_ts produced warnings on x32 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #10357 Closes #844
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions