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

bitpit: miscellaneous coverity fixes #91

Merged
merged 5 commits into from
Oct 24, 2020
Merged

bitpit: miscellaneous coverity fixes #91

merged 5 commits into from
Oct 24, 2020

Conversation

andrea-iob
Copy link
Member

Fixes for errors found by Coverity.

Fixes an error reported by Coverity: "sign_extension: Suspicious
implicit sign extension: this->m_dimensions with type uint8_t
(8 bits, unsigned) is promoted in this->m_dimensions * nCoeffs to
type int (32 bits, signed), then sign-extended to type unsigned
long (64 bits, unsigned). If this->m_dimensions * nCoeffs is
greater than 0x7FFFFFFF, the upper bits of the result will all
be 1".
…overflow

Fixes an error reported by Coverity: "overflow_before_widen: Applying the
unary minus operator to dh of type uint32_t and assigning the result to
coord[2UL] of type std::array<long, 3ul>::value_type could produce an
unintended large positive integer".
@andrea-iob andrea-iob merged commit d5de4fc into master Oct 24, 2020
@andrea-iob andrea-iob deleted the coverity.fixes branch October 24, 2020 18:02
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.

3 participants