Removing unused key_expression_index variable
What changed, and why it matters
This commit simply removes an unused local variable named key_expression_index from a single function. It does not change program behavior, fix a bug, or alter any security logic. There is no security relevance.
No security action needed. Treat as routine code-quality cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes the declaration int key_expression_index = 0; and the increment ++key_expression_index; inside sign_transaction() in src/handler/sign_psbt.c. The variable was written but never read, so removal is a non-functional cleanup. No control flow, memory handling, cryptographic operations, or PSBT parsing logic is modified.
Changed components
src/handler/sign_psbt.cInspect captured patch +0 / −4
diff --git a/src/handler/sign_psbt.c b/src/handler/sign_psbt.c
index 072d27e..963a709 100644
--- a/src/handler/sign_psbt.c
+++ b/src/handler/sign_psbt.c
@@ -2027,8 +2027,6 @@ sign_transaction(dispatcher_context_t *dc,
const uint8_t internal_inputs[static BITVECTOR_REAL_SIZE(MAX_N_INPUTS_CAN_SIGN)]) {
LOG_PROCESSOR(__FILE__, __LINE__, __func__);
- int key_expression_index = 0;
-
// Iterate over all the key expressions that correspond to keys owned by us
for (size_t i_keyexpr = 0; i_keyexpr < st->n_internal_key_expressions; i_keyexpr++) {
keyexpr_info_t *keyexpr_info = &st->internal_key_expressions[i_keyexpr];
@@ -2081,8 +2079,6 @@ sign_transaction(dispatcher_context_t *dc,
}
}
}
-
- ++key_expression_index;
}
return true;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.