Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove currentHeight unused var in nbgl_use_case #509

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions lib_nbgl/src/nbgl_use_case.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,16 +774,14 @@ uint8_t nbgl_useCaseGetNbTagValuesInPage(uint8_t nbPair
*/
uint8_t nbgl_useCaseGetNbPagesForTagValueList(const nbgl_layoutTagValueList_t *tagValueList)
{
uint8_t nbPages = 0;
uint8_t nbPairs = tagValueList->nbPairs;
uint8_t nbPairsInPage;
uint16_t currentHeight = 0;
uint8_t i = 0;
bool tooLongToFit;
uint8_t nbPages = 0;
uint8_t nbPairs = tagValueList->nbPairs;
uint8_t nbPairsInPage;
uint8_t i = 0;
bool tooLongToFit;

while (i < tagValueList->nbPairs) {
// upper margin
currentHeight += 24;
nbPairsInPage = nbgl_useCaseGetNbTagValuesInPage(nbPairs, tagValueList, i, &tooLongToFit);
i += nbPairsInPage;
setNbPairs(nbPages, nbPairsInPage, tooLongToFit);
Expand Down
Loading