public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: mark@klomp.org, elfutils-devel@sourceware.org,
	Khem Raj <raj.khem@gmail.com>
Subject: Re: [PATCH] debuginfod/debuginfod-client.c: correct string format on 32bit arches with 64bit time_t
Date: Thu, 25 Nov 2021 12:51:07 -0500	[thread overview]
Message-ID: <20211125175107.GA25053@redhat.com> (raw)
In-Reply-To: <20211121221411.404194-1-alex@linutronix.de>

Hi -

> Use intmax_t to print time_t
> [...]
> -      if (dprintf(fd, "%ld", cache_config_default_s) < 0)
> +      if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
> [...]

I'm not a compatibility specialist, but note that elfutils is sometimes
built on decade-old toolchains, where use of %lld and (long long) would
certainly work.  We have such in the code base already, whereas this would
be the first %j.

- FChE


  reply	other threads:[~2021-11-25 17:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 22:14 Alexander Kanavin
2021-11-25 17:51 ` Frank Ch. Eigler [this message]
2021-11-25 18:50   ` Alexander Kanavin
2021-11-25 19:24     ` Frank Ch. Eigler
2021-12-05 20:31 ` Mark Wielaard
2021-12-05 20:45   ` Alexander Kanavin
2021-12-08 15:31     ` Mark Wielaard
2021-12-09  9:52       ` Alexander Kanavin
2021-12-09  0:56   ` Frank Ch. Eigler
  -- strict thread matches above, loose matches on Subject: below --
2021-11-19 18:15 Alexander Kanavin
2021-11-20  3:57 ` Érico Nogueira
2021-11-20  8:11   ` Alexander Kanavin
2021-11-20 14:41     ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211125175107.GA25053@redhat.com \
    --to=fche@redhat.com \
    --cc=alex.kanavin@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).