pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Suppress variable-set-but-not-used warning from clang 13. 20+ messages / 1 participants [nested] [flat]
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bd110e250e9d9291d7fc1ea12ddd5d177a2460bd Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/68cc72d4d55cd1d45c24f0f3fccc1f445b6ad0da Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ef4edf88df6592b6a29649f3ae69d44cef478291 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0cbc50737864177a29430be41e5b134a29e77554 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/dc43fc9b3aa3e0fa9c84faddad6d301813580f88 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d9a81e8671897340dcfec2d2365def9972d917d0 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f90b9998b1e302ddf219ad92d86bb0c21fdf4753 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f3653d7992358708baf401fcabb239b46d27942f Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/927e235aa0f6ce598eee9f251e09653a015974d8 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_2_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ad96696ead364347d4b492bf9a2d5b82bbe5a2d3 Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warning from clang 13. @ 2022-01-23 16:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-01-23 16:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f70550327ba53c052f4c8171044c7d23edacc79c Modified Files -------------- src/backend/optimizer/geqo/geqo_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ca3b730baa1354c86bff78c246415443d4732f02 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/backend/utils/adt/jsonpath_gram.y | 1 + src/bin/pgbench/exprparse.y | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2e124d857a64a91d2b70afdbed6156d753089771 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/backend/utils/adt/jsonpath_gram.y | 1 + src/bin/pgbench/exprparse.y | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b7d9b0c2667e823404552e968431198288aee55e Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/backend/utils/adt/jsonpath_gram.y | 1 + src/bin/pgbench/exprparse.y | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/612e7966127e7f58ae10198250410719df6c1b11 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- 4 files changed, 4 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/85c077f9e0229d5e626f66d1a10e17a95c3564ff Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/bin/pgbench/exprparse.y | 5 ++++- 5 files changed, 8 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/152c9f7b8f01437780d9f87bfe945bba47efdd0a Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/backend/utils/adt/jsonpath_gram.y | 1 + src/bin/pgbench/exprparse.y | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/760308704378a96e6a7266326087ec49922ae3f2 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/bin/pgbench/exprparse.y | 5 ++++- 5 files changed, 8 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6ae8aee0b67b92529b694b1d515b0acb03fb8eb5 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/bin/pgbench/exprparse.y | 5 ++++- 5 files changed, 8 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
* pgsql: Suppress variable-set-but-not-used warnings from clang 15. @ 2022-09-20 16:05 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 20+ messages in thread From: Tom Lane @ 2022-09-20 16:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Suppress variable-set-but-not-used warnings from clang 15. clang 15+ will issue a set-but-not-used warning when the only use of a variable is in autoincrements (e.g., "foo++;"). That's perfectly sensible, but it detects a few more cases that we'd not noticed before. Silence the warnings with our usual methods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case by actually removing a useless variable. One thing that we can't nicely get rid of is that with %pure-parser, Bison emits "yynerrs" as a local variable that falls foul of this warning. To silence those, I inserted "(void) yynerrs;" in the top-level productions of affected grammars. Per recently-established project policy, this is a candidate for back-patching into out-of-support branches: it suppresses annoying compiler warnings but changes no behavior. Hence, back-patch to 9.5, which is as far as these patches go without issues. (A preliminary check shows that the prior branches need some other set-but-not-used cleanups too, so I'll leave them for another day.) Discussion: https://postgr.es/m/514615.1663615243@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f38a0bde21776f6a8e92b73645c3d54764c85459 Modified Files -------------- src/backend/access/gist/gistxlog.c | 2 +- src/backend/access/transam/xlog.c | 2 +- src/backend/parser/gram.y | 1 + src/backend/utils/adt/array_typanalyze.c | 4 +--- src/backend/utils/adt/jsonpath_gram.y | 1 + src/bin/pgbench/exprparse.y | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 20+ messages in thread
end of thread, other threads:[~2022-09-20 16:05 UTC | newest] Thread overview: 20+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-01-23 16:10 pgsql: Suppress variable-set-but-not-used warning from clang 13. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-20 16:05 pgsql: Suppress variable-set-but-not-used warnings from clang 15. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox