Suppress variable-set-but-not-used warning from clang 13.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Jan 2022 16:09:00 +0000 (11:09 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Jan 2022 16:09:00 +0000 (11:09 -0500)
commitdc43fc9b3aa3e0fa9c84faddad6d301813580f88
treeb60bedf23c7710d636b241027823acbd92fbe912
parent7b65862e2280eafca00566ee44af2c1bbb143e9d
Suppress variable-set-but-not-used warning from clang 13.

In the normal configuration where GEQO_DEBUG isn't defined,
recent clang versions have started to complain that geqo_main.c
accumulates the edge_failures count but never does anything
with it.  As a minimal back-patchable fix, insert a void cast
to silence this warning.  (I'd speculated about ripping out the
GEQO_DEBUG logic altogether, but I don't think we'd wish to
back-patch that.)

Per recently-established project policy, this is a candidate
for back-patching into out-of-support branches: it suppresses
an annoying compiler warning but changes no behavior.  Hence,
back-patch all the way to 9.2.

Discussion: https://postgr.es/m/CA+hUKGLTSZQwES8VNPmWO9AO0wSeLt36OCPDAZTccT1h7Q7kTQ@mail.gmail.com
src/backend/optimizer/geqo/geqo_main.c