[PATCH v2 4/6] drivers: fix exported headers
David Marchand
david.marchand at redhat.com
Mon Dec 16 09:15:40 CET 2024
On Fri, Dec 13, 2024 at 2:46 PM David Marchand
<david.marchand at redhat.com> wrote:
> > > diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
> > > index f668e6ea82..c200c935ff 100644
> > > --- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
> > > +++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
> > > @@ -391,6 +391,7 @@ rte_pmd_bphy_intr_init(uint16_t dev_id)
> > > {
> > > struct cnxk_bphy_irq_msg msg = {
> > > .type = CNXK_BPHY_IRQ_MSG_TYPE_INIT,
> > > + .data = NULL,
> > > };
> > >
> >
> > Why is this addition necessary? Is it for C++ compile?
>
> IIRC, this is because DPDK meson passes
> -Wno-missing-field-initializers globally, and the Makefile I wrote
> does not.
> I'll double check.
Yep, confirmed.
...
In file included from
/home/dmarchan/builds/main/build-x86-generic/buildtools/chkincs/rte_pmd_cnxk_gpio.c:1:
/home/dmarchan/builds/main/build-x86-generic/install/usr/local/include/rte_pmd_cnxk_gpio.h:
In function ‘int rte_pmd_gpio_get_pin_value(uint16_t, int, int*)’:
/home/dmarchan/builds/main/build-x86-generic/install/usr/local/include/rte_pmd_cnxk_gpio.h:264:9:
error: missing initializer for member ‘cnxk_gpio_msg::data’
[-Werror=missing-field-initializers]
264 | };
| ^
...
On the other hand, -Wmissing-field-initializers comes from -Wextra and
it is explicitly disabled in meson.
If we want to stick with -Wmissing-field-initializers "internally", I
will drop those changes (and disable missing-field-initializers,
trying to keep -Wextra in the "external" check)
--
David Marchand
More information about the dev
mailing list