atar-axis/xpadneo

View on GitHub
hid-xpadneo/src/hid-xpadneo.c

Summary

Maintainability
Test Coverage

Clarify calculation precedence for & and ?.
Open

            input_report_key(gamepad, BTN_PADDLES(0), value & 1 ? 1 : 0);
Severity: Minor
Found in hid-xpadneo/src/hid-xpadneo.c by cppcheck

Suspicious calculation. Please use parentheses to clarify the code. The code a&b?c:d should be written as either (a&b)?c:d or a&(b?c:d). (detailed CWE explanation)

Clarify calculation precedence for & and ?.
Open

            input_report_key(gamepad, BTN_PADDLES(1), value & 2 ? 1 : 0);
Severity: Minor
Found in hid-xpadneo/src/hid-xpadneo.c by cppcheck

Suspicious calculation. Please use parentheses to clarify the code. The code a&b?c:d should be written as either (a&b)?c:d or a&(b?c:d). (detailed CWE explanation)

Clarify calculation precedence for & and ?.
Open

            input_report_key(gamepad, BTN_PADDLES(3), value & 8 ? 1 : 0);
Severity: Minor
Found in hid-xpadneo/src/hid-xpadneo.c by cppcheck

Suspicious calculation. Please use parentheses to clarify the code. The code a&b?c:d should be written as either (a&b)?c:d or a&(b?c:d). (detailed CWE explanation)

Clarify calculation precedence for & and ?.
Open

            input_report_key(gamepad, BTN_PADDLES(2), value & 4 ? 1 : 0);
Severity: Minor
Found in hid-xpadneo/src/hid-xpadneo.c by cppcheck

Suspicious calculation. Please use parentheses to clarify the code. The code a&b?c:d should be written as either (a&b)?c:d or a&(b?c:d). (detailed CWE explanation)

There are no issues that match your filters.

Category
Status