From: Petr Vorel <petr.vorel@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/nfs-utils: Backport yet another printf fix
Date: Tue, 3 Aug 2021 00:06:46 +0200 [thread overview]
Message-ID: <YQhsdkzd/vbHXA94@pevik> (raw)
In-Reply-To: <20210802221341.760ffbf0@windsurf>
Hi Thomas,
> On Mon, 2 Aug 2021 21:17:12 +0200
> Petr Vorel <petr.vorel@gmail.com> wrote:
> > > And thank you for fixing this :-)
> > Yw. I see time_t printf format is more tricky than I expected, your traditional
> > approach with casting to long long would not require this change to uint64_t :).
> Actually, we have this printf() / time_t issue on other packages, on
> 32-bit architectures where time_t is a 64-bit value (RISC-V 32-bit for
> example). What is the correct solution in the end?
I believe all 3 patches (2 already merged + this one) should fix the problem.
But I was not able to verify it, because ./utils/test-pkg didn't catch even
this error (I tested all available toolchains), IMHO -Werror=format=2 and other
-Werror are probably only on http://autobuild.buildroot.net/ (not in Buildroot
config for users). It'd be great if ./utils/test-pkg had the same CFLAGS.
Or have I (again) overlooked something?
> Apparently, the really standard solution is simply to *not* print a
> time_t, as it's supposed to be an opaque type, which can be different
> things depending on the underlying implementation. But in practice, a
> lot of packages do printf() time_t values.
Yep, convert it to string is recommended, but as you noted, many people do.
> Thomas
Kind regards,
Petr
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-08-02 22:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 17:21 [Buildroot] [PATCH 1/1] package/nfs-utils: Backport yet another printf fix Petr Vorel
2021-08-02 18:42 ` Giulio Benetti
2021-08-02 19:17 ` Petr Vorel
2021-08-02 19:29 ` Giulio Benetti
2021-08-02 20:13 ` Thomas Petazzoni
2021-08-02 22:06 ` Petr Vorel [this message]
2021-08-03 6:57 ` Thomas Petazzoni
2021-08-03 17:17 ` Petr Vorel
2021-08-03 21:00 ` Arnout Vandecappelle
2021-08-03 21:23 ` Petr Vorel
2021-08-03 8:20 ` Maxim Kochetkov via buildroot
2021-08-03 20:47 ` Arnout Vandecappelle
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=YQhsdkzd/vbHXA94@pevik \
--to=petr.vorel@gmail.com \
--cc=buildroot@buildroot.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=thomas.petazzoni@bootlin.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