Skip to content

cppcheck warning due to if (true) inside while (true) #157

Closed
@armandas

Description

@armandas

The following code in lfs.c causes a cppcheck warning

Identical inner 'if' condition is always true (outer condition is 'true' and inner condition is 'true').

    // begin loop to commit compaction to blocks until a compact sticks
    while (true) {
        if (true) {

if (true) appears in several places in littlefs. Is this done for debugging purposes or some other reasons? Is it possible to change the implementation to avoid the warning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions