Skip to content

Commit

Permalink
ignore clang warning
Browse files Browse the repository at this point in the history
  • Loading branch information
svenklemm committed Jun 18, 2024
1 parent 7e86e5d commit cf4b2f6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/foreign_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid,
break;
}

/*
* clang will complain here about swapped arguments but this is intentional
* as this is the reverse trigger from the referenced table back to the
* referencing table.
*
* NOLINTBEGIN(readability-suspicious-call-argument)
*/
CreateTrigger(fk_trigger,
NULL,
refRelOid,
Expand All @@ -330,6 +337,7 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid,
NULL,
true,
false);
/* NOLINTEND(readability-suspicious-call-argument) */

/* Make changes-so-far visible */
CommandCounterIncrement();
Expand Down Expand Up @@ -383,6 +391,13 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid,
break;
}

/*
* clang will complain here about swapped arguments but this is intentional
* as this is the reverse trigger from the referenced table back to the
* referencing table.
*
* NOLINTBEGIN(readability-suspicious-call-argument)
*/
CreateTrigger(fk_trigger,
NULL,
refRelOid,
Expand All @@ -394,6 +409,7 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid,
NULL,
true,
false);
/* NOLINTEND(readability-suspicious-call-argument) */

/* Make changes-so-far visible */
CommandCounterIncrement();
Expand Down

0 comments on commit cf4b2f6

Please sign in to comment.