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

Commit1871b04

Browse files
committed
trick clang analyzer (dereference of NULL pointer)
1 parent115296a commit1871b04

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/pg_pathman.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,17 @@ make_inh_translation_list(Relation oldrelation, Relation newrelation,
239239
for (new_attno=0;new_attno<newnatts;new_attno++)
240240
{
241241
att=new_tupdesc->attrs[new_attno];
242+
243+
/*
244+
* Make clang analyzer happy:
245+
*
246+
* Access to field 'attisdropped' results
247+
* in a dereference of a null pointer
248+
*/
249+
if (!att)
250+
elog(ERROR,"error in function "
251+
CppAsString(make_inh_translation_list));
252+
242253
if (!att->attisdropped&&att->attinhcount!=0&&
243254
strcmp(attname,NameStr(att->attname))==0)
244255
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp