We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 353a27a + 49f1eb3 commit 8bb6fe8Copy full SHA for 8bb6fe8
refs.c
@@ -1094,6 +1094,13 @@ int ref_transaction_update(struct ref_transaction *transaction,
1094
if (flags & ~REF_TRANSACTION_UPDATE_ALLOWED_FLAGS)
1095
BUG("illegal flags 0x%x passed to ref_transaction_update()", flags);
1096
1097
+ /*
1098
+ * Clear flags outside the allowed set; this should be a noop because
1099
+ * of the BUG() check above, but it works around a -Wnonnull warning
1100
+ * with some versions of "gcc -O3".
1101
+ */
1102
+ flags &= REF_TRANSACTION_UPDATE_ALLOWED_FLAGS;
1103
+
1104
flags |= (new_oid ? REF_HAVE_NEW : 0) | (old_oid ? REF_HAVE_OLD : 0);
1105
1106
ref_transaction_add_update(transaction, refname, flags,
0 commit comments