Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf3653d7

Browse files
committed
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.caccumulates the edge_failures count but never does anythingwith it. As a minimal back-patchable fix, insert a void castto silence this warning. (I'd speculated about ripping out theGEQO_DEBUG logic altogether, but I don't think we'd wish toback-patch that.)Per recently-established project policy, this is a candidatefor back-patching into out-of-support branches: it suppressesan 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
1 parent116a509 commitf3653d7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/optimizer/geqo/geqo_main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,17 @@ geqo(PlannerInfo *root, int number_of_rels, List *initial_rels)
227227
}
228228

229229

230-
#if defined(ERX)&& defined(GEQO_DEBUG)
230+
#if defined(ERX)
231+
#if defined(GEQO_DEBUG)
231232
if (edge_failures!=0)
232233
elog(LOG,"[GEQO] failures: %d, average: %d",
233234
edge_failures, (int)number_generations /edge_failures);
234235
else
235236
elog(LOG,"[GEQO] no edge failures detected");
237+
#else
238+
/* suppress variable-set-but-not-used warnings from some compilers */
239+
(void)edge_failures;
240+
#endif
236241
#endif
237242

238243
#if defined(CX)&& defined(GEQO_DEBUG)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp