Skip to content

libfreenect/fakenect/fakenect.c:78: bad type for local variable ? #365

@dcb314

Description

@dcb314

libfreenect/fakenect/fakenect.c:78]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.

Source code is

char c;
while ((c = fgetc(fp))) {
    if (c == '\n' || c == EOF)

Suggest change type of c from char to int. I found this bug in the
latest sources in git with static analyser cppcheck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions