Re: [PATCH] Fix compiler warnings by using designated initializers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Fix compiler warnings by using designated initializers
Date
Msg-id 3426827.1780590994@sss.pgh.pa.us
Whole thread
In response to [PATCH] Fix compiler warnings by using designated initializers  (Zakariyah Ali <zakariyahali100@gmail.com>)
Responses Re: [PATCH] Fix compiler warnings by using designated initializers
List pgsql-hackers
Zakariyah Ali <zakariyahali100@gmail.com> writes:
> Use C99 designated initializers (.type = T_ErrorSaveContext) instead of the
> standard initializer {T_ErrorSaveContext} when initializing ErrorSaveContext.
> This avoids missing-field-initializers compiler warnings for the remaining fields of
> the struct (e.g. error_occurred).

What compiler produces such warnings?  I'm not really eager to make
invasive, more-typing-required changes like this, especially when
it's not obvious that the modified code is any more correct.

> Also fix a sign comparison warning in pg_dependencies_out() by changing
> the loop counter from int to uint32 to match dependencies->ndeps.

Same question --- I see no such complaints in our buildfarm.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Key joins
Next
From: "Tristan Partin"
Date:
Subject: Re: Add pg_stat_kind_info system view