[Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

Marek Olšák maraeo at gmail.com
Sun Jun 4 19:57:08 UTC 2017


NAK.

In C/C++, the initializer is used to clear the memory to 0s, thus,
adding 0s to the initializer is redundant and unnecessary. Empty
initializer {} is also commonly used instead of memset.

You need to suppress this warning if you don't want to see it.

Marek

On Sun, Jun 4, 2017 at 9:45 AM, Benedikt Schemmer <ben at besd.de> wrote:
>
> I send these patches as a series because they share the same problem:
> all have missing fields in the default initialization path for field/register
> definitions.
>
> This causes several hundreds (thousands?) of "missing initializer" warnings
> from the compiler making it hard to spot less frequent errors.
>
> This also fixes a small copy and paste error in vk_format_table.py where
> it isnt clear how it is autogenerated from where.
>
> Please kindly review and push if you find this useful.
>
> Thanks,
> Benedikt
>
> Benedikt Schemmer (3):
>   Fix missing initializer warning in sid_tables.h by adding appropriate
>     default fields in sid_tables.py
>   Fix missing initializer warning in egd_tables.h by adding appropriate
>     default fields in egd_tables.py
>   Fix missing initializer warning in vk_format_table.h by adding
>     appropriate default fields in vk_format_table.py
>
>  src/amd/common/sid_tables.py           | 4 ++--
>  src/amd/vulkan/vk_format_table.py      | 4 ++--
>  src/gallium/drivers/r600/egd_tables.py | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> --
> 2.11.0
>


More information about the mesa-dev mailing list