Index | Thread | Search

From:
George Koehler <kernigh@gmail.com>
Subject:
Re: new warning in make
To:
Marc Espie <marc.espie.openbsd@gmail.com>, Christian Schulte <cs@schulte.it>
Cc:
millert@openbsd.org, tech@openbsd.org, Theo Buehler <tb@theobuehler.org>
Date:
Sun, 28 Sep 2025 13:09:19 -0400

Download raw body.

Thread
On Fri, 26 Sep 2025 09:28:13 +0200
Marc Espie <marc.espie.openbsd@gmail.com> wrote:

> Can you commit this (eventually with an extra blank line) and then
> we'll bike-shed ? :D

Committed it now.


On Fri, 26 Sep 2025 11:03:56 +0200
Christian Schulte <cs@schulte.it> wrote:

> I am really not sure but I think this should read "%-12" PRIdMAX,
> (intmax_t)time(NULL));

I committed it as (long long)time(NULL), to be like the (long long)
casts in usr.bin/time/time.c.

> What about -Wformat-signedness?

I don't care to fix warnings from -Wformat-signedness like,

exam.c:2:30: warning: format specifies type 'unsigned int' but the
argument has type 'int' [-Wformat]
    2 | void f(int i) { printf("%x", i); }
      |                         ~~   ^
      |                         %x

It is wrong to pass 'int' to "%x", but it probably works.  (Passing
'float' or 'struct {int m;}' to "%x" would fail on some platforms.)

espie needed to fix the warning from -Wformat-truncation, because
the code didn't work; it put '\0' in the wrong place.
--gkoehler