| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Zakariyah Ali <zakariyahali100(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Fix compiler warnings by using designated initializers |
| Date: | 2026-06-04 16:36:34 |
| Message-ID: | 3426827.1780590994@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Zakariyah Ali <zakariyahali100(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tristan Partin | 2026-06-04 16:59:00 | Re: Add pg_stat_kind_info system view |
| Previous Message | Diego Frias | 2026-06-04 16:32:53 | Re: [PATCH] Fix recognizing 0x11A7 as a Hangul T syllable in Unicode normalization |