| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | unused-but-set-variable warning on REL_13_STABLE |
| Date: | 2024-12-09 19:16:38 |
| Message-ID: | Z1dCFnzrP24O8WNR@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
My compiler emits the following warning on REL_13_STABLE when assertions
are disabled:
reorderbuffer.c:2471:8: warning: variable 'spilled' set but not used [-Wunused-but-set-variable]
2471 | Size spilled = 0;
| ^
Adding PG_USED_FOR_ASSERTS_ONLY (as in the attached patch) seems sufficient
to suppress this warning. On newer versions, this variable is used for
more than assertions, so the patch only needs to be applied to v13. Since
this is trivial, I plan to commit it shortly.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| fix_unused_warning.patch | text/plain | 588 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-12-09 19:39:30 | Re: unused-but-set-variable warning on REL_13_STABLE |
| Previous Message | Daniel Gustafsson | 2024-12-09 19:03:09 | Re: Fix tiny memory leaks |