Skip to content

MFRC522Extended.cpp:824: warning: ordered comparison of pointer with integer zero #371

@szotsaki

Description

@szotsaki

The following GCC warning is emitted during compile:

MFRC522Extended.cpp:824: warning: ordered comparison of pointer with integer zero [-Wextra]
  if (backData && (backLen > 0)) {
                             ^

Since backLen is a pointer, it will be always positive. However, for fixing it I don't know if it's a bug

  • not being backLen != nullptr or
  • not being *backLen > 0 or
  • just a slight oversight and the comparison is unnecessary.

The same is also in line 847.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛a not intended featurehelp_wanted 💉here you can help others or/and make pull requests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions