Skip to content

Commit 1c07625

Browse files
committed
mnemonic: avoid an unused variable warning for ci builds
1 parent 5422399 commit 1c07625

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

main/process/mnemonic.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,9 +1334,18 @@ void initialise_with_mnemonic(const bool temporary_restore, const bool force_qr_
13341334
gui_set_current_activity_ex(act, true);
13351335

13361336
const int32_t ev_id = gui_activity_wait_button(act, BTN_EVENT_TIMEOUT);
1337-
#ifndef CONFIG_DEBUG_UNATTENDED_CI
13381337
switch (ev_id) {
13391338
case BTN_EVENT_TIMEOUT:
1339+
#ifdef CONFIG_DEBUG_UNATTENDED_CI
1340+
// In a debug unattended ci build, use hardcoded mnemonic after a short delay
1341+
strcpy(mnemonic,
1342+
"fish inner face ginger orchard permit useful method fence kidney chuckle party favorite sunset "
1343+
"draw "
1344+
"limb "
1345+
"science crane oval letter slot invite sadness banana");
1346+
got_mnemonic = true;
1347+
break;
1348+
#else
13401349
JADE_ASSERT(false);
13411350
case BTN_MNEMONIC_EXIT:
13421351
// Abandon setting up mnemonic altogether
@@ -1391,19 +1400,11 @@ void initialise_with_mnemonic(const bool temporary_restore, const bool force_qr_
13911400
got_mnemonic = mnemonic_qr(mnemonic, sizeof(mnemonic));
13921401
qr_scanned = got_mnemonic;
13931402
break;
1394-
1403+
#endif
13951404
default:
13961405
// Unknown event, ignore
13971406
continue;
13981407
}
1399-
#else
1400-
// In a debug unattended ci build, use hardcoded mnemonic after a short delay
1401-
strcpy(mnemonic,
1402-
"fish inner face ginger orchard permit useful method fence kidney chuckle party favorite sunset draw "
1403-
"limb "
1404-
"science crane oval letter slot invite sadness banana");
1405-
got_mnemonic = true;
1406-
#endif
14071408
}
14081409
}
14091410

0 commit comments

Comments
 (0)