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

fs/fcb: Coverity fix #3308

Merged
merged 1 commit into from
Sep 12, 2024
Merged

fs/fcb: Coverity fix #3308

merged 1 commit into from
Sep 12, 2024

Conversation

kasjer
Copy link
Contributor

@kasjer kasjer commented Sep 11, 2024

There was no real problem with the code
356 loc1.fe_area = fcb_get_prev_area(fcb, loc->fe_area);

CID 418283:  Code maintainability issues  (UNUSED_VALUE)
Assigning value "0UL" to "loc1.fe_elem_off" here, but that stored value is overwritten before it can be used.

357 loc1.fe_elem_off = 0;

This should satisfy coverity

Additionally call fcb_start_offset(fcb); in function fcb_step()
is replaced with precomputed value that was used in some place
but not in others

There was no real problem with the code
356                         loc1.fe_area = fcb_get_prev_area(fcb, loc->fe_area);
>>>     CID 418283:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value "0UL" to "loc1.fe_elem_off" here, but that stored value is overwritten before it can be used.
357                         loc1.fe_elem_off = 0;

This should satisfy coverity

Signed-off-by: Jerzy Kasenberg <[email protected]>
@kasjer kasjer merged commit 24fc281 into apache:master Sep 12, 2024
19 checks passed
@kasjer kasjer deleted the kasjer/fcb-coverity-fix branch September 12, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants