Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Ecc: Spurious alarm when typedef spans two lines #67

Open
deeglaze opened this issue Oct 24, 2022 · 0 comments
Open

[Bug]: Ecc: Spurious alarm when typedef spans two lines #67

deeglaze opened this issue Oct 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@deeglaze
Copy link

Contact Details

[email protected]

Describe the Bug

The DeclCheckSameStructure error has a false positive with

typedef _VERY_LONG_PROTOCOL_NAME
  VERY_LONG_PROTOCOL_NAME;

...

struct _VERY_LONG_PROTOCOL_NAME {
  int field0;
};

and can be "fixed" with an over-long line where the typedef without the line break is longer than 80 characters.

Reproduction steps

  1. I was CI testing https://github.com/deeglaze/edk2/tree/enable_umv8
  2. I had the initial typedef in MdePkg/Include/Protocol/MemoryAcceptance.h span two lines.

The CI alarmed saying that I had defined _BZ3987_MEMORY_ACCEPTANCE_PROTOCOL twice, which is not correct.

Expected behavior

The typedef with a line break should not trigger this alarm.

A typedef should be allowed to span two lines if it would otherwise take more than 80 characters.

Execution Environment

Ran in edk2's CI

Pip packages

No response

Additional context

No response

@deeglaze deeglaze added the bug Something isn't working label Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant