| From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Erroneous -Werror=missing-braces on old GCC |
| Date: | 2023-12-25 02:42:43 |
| Message-ID: | CAMbWs48GzM-Ff7vr=_CeqaXxFBB9UntqtaW1cjU8hOo62AbOOg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I came across the 'missing braces' warning again when building master
(0a93f803f4) on old GCC (4.8.5).
blkreftable.c: In function ‘BlockRefTableSetLimitBlock’:
blkreftable.c:268:2: warning: missing braces around initializer
[-Wmissing-braces]
BlockRefTableKey key = {0}; /* make sure any padding is zero */
^
This has popped up a few times in the past, and it seems to be GCC bug
53119. We previously used the {{...}} approach to suppress it. Should
we do the same here, like attached?
FWIW, in the same file we initialize BlockRefTableSerializedEntry
variables also with {{0}}.
Thanks
Richard
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-erroneous-Werror-missing-braces-on-old-GCC.patch | application/octet-stream | 1.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Japin Li | 2023-12-25 03:48:37 | Re: Erroneous -Werror=missing-braces on old GCC |
| Previous Message | Japin Li | 2023-12-25 02:27:32 | Re: Transaction timeout |