Skip to content

Unguarded if clause #12

@astrelsky

Description

@astrelsky
source/device/hid/keyboard.c:163:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]

if (parse->Report[i]->Fields[j].Usage.Keyboard >= KeyboardLeftControl
&& parse->Report[i]->Fields[j].Usage.Keyboard <= KeyboardRightGui)
LOG_DEBUGF("KBD: Modifier %d detected! Offset=%x, size=%x\n", parse->Report[i]->Fields[j].Usage.Keyboard, parse->Report[i]->Fields[j].Offset, parse->Report[i]->Fields[j].Size);
data->KeyFields[(u16)parse->Report[i]->Fields[j].Usage.Keyboard - (u16)KeyboardLeftControl] =
&parse->Report[i]->Fields[j];

Are both lines supposed to be guarded by the if statement, or only the LOG_DEBUGF?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions