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

Commit016f443

Browse files
committed
Suppress Coverity warnings about Asserts in get_name_for_var_field.
Coverity thinks dpns->plan could be null at these points. Thatshouldn't really be possible, but it's easy enough to modify theAsserts so they'd not core-dump if it were true.These are new inb919a97. Back-patch to v13; the v12 versionof the patch didn't have these Asserts.
1 parentadf9808 commit016f443

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7298,11 +7298,11 @@ get_name_for_var_field(Var *var, int fieldno,
72987298
{
72997299
char*dummy_name=palloc(32);
73007300

7301-
Assert(IsA(dpns->plan,Result));
7301+
Assert(dpns->plan&&IsA(dpns->plan,Result));
73027302
snprintf(dummy_name,32,"f%d",fieldno);
73037303
returndummy_name;
73047304
}
7305-
Assert(IsA(dpns->plan,SubqueryScan));
7305+
Assert(dpns->plan&&IsA(dpns->plan,SubqueryScan));
73067306

73077307
tle=get_tle_by_resno(dpns->inner_tlist,attnum);
73087308
if (!tle)
@@ -7426,11 +7426,11 @@ get_name_for_var_field(Var *var, int fieldno,
74267426
{
74277427
char*dummy_name=palloc(32);
74287428

7429-
Assert(IsA(dpns->plan,Result));
7429+
Assert(dpns->plan&&IsA(dpns->plan,Result));
74307430
snprintf(dummy_name,32,"f%d",fieldno);
74317431
returndummy_name;
74327432
}
7433-
Assert(IsA(dpns->plan,CteScan));
7433+
Assert(dpns->plan&&IsA(dpns->plan,CteScan));
74347434

74357435
tle=get_tle_by_resno(dpns->inner_tlist,attnum);
74367436
if (!tle)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp