Skip to content

Conversation

RossSmyth
Copy link
Contributor

Close #791

My process:

  1. Add the flags for ignoring the -Weverything errors
  2. Go through and remove each flag and attempt to fix them

Not all were successes. Some of the files are laid out in ways I don't really understand.

It is arranged in nice atomic commits, but can be squashed.

Tested with Clang and with GCC.

@mvandervoord
Copy link
Member

Hi. Thanks for the collection of fixes! We really appreciate the help!

This project supports more compilers than just clang and gcc, so we need to be a bit careful about some of the changes. If you don't mind making a few tweaks to better support those other compilers?

For example:

  • Your direct usage of __attribute__(( blah )) isn't valid. Instead, you should use UNITY_FUNCTION_ATTR()
  • Your calls to clang-specific pragma's should be protected by #ifdef __clang__ checks

Thanks so much!

RossSmyth added 6 commits July 9, 2025 15:17
"empty expression statement has no effect; remove unnecessary ';'"

These macros were not properly wrapped
These are reserved by the standard
This one was a bit tough, but I think this works fine.
@mvandervoord mvandervoord merged commit fe8d1e9 into ThrowTheSwitch:master Jul 9, 2025
4 checks passed
@mvandervoord
Copy link
Member

Thanks for the help, @RossSmyth !

@RossSmyth RossSmyth deleted the errors branch July 10, 2025 17:46
@RossSmyth
Copy link
Contributor Author

RossSmyth commented Jul 10, 2025

I would also recommend #790, #771, and #769 since that is my work account, and I am currently carrying those patches at work.

@RossSmyth
Copy link
Contributor Author

Thanks!

@mvandervoord
Copy link
Member

:) Thank YOU!

I'm not a meson user myself... so I intended to solicit a 2nd opinion on some of those... I'm sure I'll hear about it. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling with Clang results in many errors w.r.t "unsafe buffer access"
2 participants