[Mesa-dev] [PATCH 1/3] Fix missing initializer warning in sid_tables.h by adding appropriate default fields in sid_tables.py

Nicolai Hähnle nhaehnle at gmail.com
Wed Jun 7 10:25:03 UTC 2017


On 04.06.2017 09:45, Benedikt Schemmer wrote:
> Fix missing initializer warning in sid_tables.h by adding appropriate default fields in sid_tables.py

I thought this was fine? Which compiler / compiler settings complains 
about this? That should be added to the commit message.

The change itself looks correct to me.

Cheers,
Nicolai

> 
> ---
>   src/amd/common/sid_tables.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/amd/common/sid_tables.py b/src/amd/common/sid_tables.py
> index fd88d3c9d5..691d766b08 100644
> --- a/src/amd/common/sid_tables.py
> +++ b/src/amd/common/sid_tables.py
> @@ -270,7 +270,7 @@ struct si_packet3 {
>                           strings.add(field.name), field.s_name,
>                           len(values_offsets), strings_offsets.add(values_offsets))
>                   else:
> -                    print '\t{%s, %s(~0u)},' % (strings.add(field.name), field.s_name)
> +                    print '\t{%s, %s(~0u), 0, 0},' % (strings.add(field.name), field.s_name)
>                   fields_idx += 1
> 
>       print '};'
> @@ -282,7 +282,7 @@ struct si_packet3 {
>               print '\t{%s, %s, %s, %s},' % (strings.add(reg.name), reg.r_name,
>                   len(reg.fields), reg.fields_idx if reg.own_fields else reg.fields_owner.fields_idx)
>           else:
> -            print '\t{%s, %s},' % (strings.add(reg.name), reg.r_name)
> +            print '\t{%s, %s, 0, 0},' % (strings.add(reg.name), reg.r_name)
>       print '};'
>       print
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list