]> git.ipfire.org Git - thirdparty/glibc.git/commit
support: Fix timespec printf
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 10 May 2019 12:35:18 +0000 (09:35 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 10 May 2019 12:39:19 +0000 (09:39 -0300)
commiteb669ff5bf2c8093b7e88b75e745ce3f1f4bd8a4
tree200e4435ba664f1c5a26ad48eb616548248818a0
parent44ac6ee97a111ab3680a9e95f013cbd8d0b02e48
support: Fix timespec printf

The patch print timespec members as intmax_t instead of long int.
It avoid the -Werror=format= build issue on x32:

  timespec.c: In function 'test_timespec_before_impl':
  timespec.c:32:23: error: format '%ld' expects argument of type 'long int',
  but argument 4 has type '__time_t' {aka 'const long long int'} [-Werror=format=]

Checked on x86_64-linux-gnu-x32, x86_64-linux-gnu, and i686-linux-gnu.

* support/timespec.c (test_timespec_before_impl,
test_timespec_equal_or_after_impl): print timespec member as intmax_t
insted of long int.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
ChangeLog
support/timespec.c