From: Daniel Wagner <wagi@monom.org>
To: Christian Eggers <ceggers@arri.de>
Cc: John Kacur <jkacur@redhat.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH] all: Fix printf format errors
Date: Wed, 3 Mar 2021 08:28:34 +0100 [thread overview]
Message-ID: <20210303072834.pi2pej3xczdx4jsa@beryllium.lan> (raw)
In-Reply-To: <9852721.nUPlyArG6x@n95hx1g2>
On Wed, Mar 03, 2021 at 07:23:50AM +0100, Christian Eggers wrote:
> On Tuesday, 2 March 2021, 20:58:22 CET, John Kacur wrote:
> >
> > On Fri, 26 Feb 2021, Christian Eggers wrote:
> >
> > > time_t is "long" or "long long" (depending on the system). So it should
> > > be safe to convert it to "long long", in order to get a consistent data
> > > type on all systems.
> > >
> > > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > > ---
> > > fprintf(f, " }%s\n", i == num_threads - 1 ? "" : ",");
> > > [...}
> > Are you seeing a compile time warning on some systems?
>
> Yes, I do. I have an ARM32 system with 64 bit time_t.
>
> I think that some of the printf format strings are simply wrong (e.g. using
> PRIu64 for a "long int"). For time_t, some systems require "%ld" while others
> require "%lld". Casting the values to "long long" seems to be easier compared
> to have individual format strings for different platforms.
Indeed, that was my fault. I've also send out patches for this a couple
of weeks ago IIRC.
next prev parent reply other threads:[~2021-03-04 0:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 7:38 [PATCH] all: Fix printf format errors Christian Eggers
2021-03-02 19:58 ` John Kacur
2021-03-03 6:23 ` Christian Eggers
2021-03-03 7:28 ` Daniel Wagner [this message]
2021-03-03 7:26 ` Sebastian Andrzej Siewior
2021-03-03 23:16 ` John Kacur
2021-03-04 8:20 ` Sebastian Andrzej Siewior
2021-03-03 23:31 ` John Kacur
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=20210303072834.pi2pej3xczdx4jsa@beryllium.lan \
--to=wagi@monom.org \
--cc=ceggers@arri.de \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
/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 NNTP newsgroup(s).