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

lvrend: fix compiler / cppcheck warning (maybe-uninitialized) #590

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Jul 28, 2024

This change is Reviewable

Comment on lines -10249 to 10251
int last_two_steps_drawn_node;
int last_two_steps_drawn_node = i;
for (int j=i; j<cnt; j++) {
last_two_steps_drawn_node = j;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loop condition j<cnt is always true the first time, because j==i and the parent loop:

for (int i=0; i<cnt; i++)

So last_two_steps_drawn_node is guaranteed to be at least i.

@poire-z poire-z merged commit 5037c1c into koreader:master Jul 28, 2024
1 check passed
@benoit-pierre benoit-pierre deleted the pr/fix_lvrend_warning branch July 28, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants