Skip to content

Coverity: Incorrect expression (UNINTENDED_INTEGER_DIVISION) #907

@jhenin

Description

@jhenin

/home/runner/work/colvars/colvars/src/colvarbias_opes.cpp: 336 in colvarbias_opes::showInfo() const()

CID 899327:         Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
Dividing integer expressions "this->m_adaptive_sigma_stride" and "this->m_pace", and then converting the integer quotient to type "double". Any remainder, or fractional part of the quotient, is ignored.

336 size_t x = cvm::ceil(m_adaptive_sigma_stride / m_pace);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugTo be used only in issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions