Skip to content

libclc/generic/lib/math/log_base.h:212: Possible &&/& mixup ? #91188

Closed
@dcb314

Description

@dcb314

Static analyser cppcheck says:

libclc/generic/lib/math/log_base.h:212:36: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]

Source code is

int is_near = x >= log_thresh1 & x <= log_thresh2;

Perhaps better code:

bool is_near = x >= log_thresh1 && x <= log_thresh2;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions