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

refactor(attributes): fix STRUCT_PACKED in clang #434

Merged
merged 2 commits into from Feb 21, 2023

Conversation

aloisklink
Copy link
Contributor

Use the __has_attribute macro to check for compiler support for __attribute__((packed)), so that STRUCT_PACKED also works on the Clang compiler.

(__has_attribute is supported by GCC, Clang, IBM compiler, and even the Oracle® Solaris Studio C compiler).

Use the [`__has_attribute`][1] macro to check for compiler support for
`__attribute__((packed))`, so that `STRUCT_PACKED` also works on the
Clang compiler.

(`__has_attribute` is supported by GCC, Clang, IBM compiler, and even
 the Oracle® Solaris Studio C compiler).

[1]: https://clang.llvm.org/docs/LanguageExtensions.html#has-attribute
@aloisklink aloisklink added the refactor Refactoring code label Feb 21, 2023
@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #434 (27ba0ba) into main (f770f44) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #434      +/-   ##
==========================================
- Coverage   53.14%   53.13%   -0.01%     
==========================================
  Files         144      144              
  Lines       19897    19897              
==========================================
- Hits        10574    10573       -1     
- Misses       9323     9324       +1     
Impacted Files Coverage Δ
tests/test_edgesec.c 94.11% <0.00%> (-0.85%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aloisklink aloisklink added this pull request to the merge queue Feb 21, 2023
Merged via the queue into main with commit 91fd91d Feb 21, 2023
@aloisklink aloisklink deleted the refactor/STRUCT_PACKED branch February 21, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants