Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: dired.c: error: type of helpmap does not match original declaration [-Werror=lto-type-mismatch]
To:
Han Boetes <han@boetes.org>
Cc:
tech@openbsd.org
Date:
Wed, 20 Aug 2025 05:16:56 +0200

Download raw body.

Thread
On Mon, Aug 18, 2025 at 07:33:37AM +0200, Han Boetes wrote:
> Adding -flto to the compiler flags reveals a bug with the declaration of
> helpmap:

Applied, thanks.

As a rule, externs should go into a header so there can be type checking
at compile time, even without -flto. The KEYMAPE() and KEYMAP kludges
make that hard to do. They should really be replaced with a single type
with a flexible array member, but that's a slightly bigger diff for
someone else to write and check.