Skip to content

Fix warnings to allow using the header on pedantic projects#9

Merged
Compaile merged 1 commit intoCompaile:mainfrom
pamarcos:fix_warnings
Nov 12, 2024
Merged

Fix warnings to allow using the header on pedantic projects#9
Compaile merged 1 commit intoCompaile:mainfrom
pamarcos:fix_warnings

Conversation

@pamarcos
Copy link
Copy Markdown
Contributor

@pamarcos pamarcos commented Nov 8, 2024

Some projects have strict requirements regarding warnings. Let's have an option to enable pedantic warnings and address them to allow those projects to use the header without having to disable them manually.

e.g. for ClickHouse

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"
#pragma clang diagnostic ignored "-Wextra"
#pragma clang diagnostic ignored "-Weverything"
#pragma clang diagnostic ignored "-Wpedantic"
#define CTRACK_DISABLE_EXECUTION_POLICY 1
#include "ctrack.hpp"
#pragma clang diagnostic pop

I've disabled some warnings compared to the ones we use at ClickHouse because they were too many and could be a style decision: shadow-field-in-constructor and newline-eof.

Some projects have strict requirements regarding warnings.
Let's have an option to enable pedantic warnings and address
them to allow those projects to use the header without having
to disable them manually.

e.g. for ClickHouse

  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wall"
  #pragma clang diagnostic ignored "-Wextra"
  #pragma clang diagnostic ignored "-Weverything"
  #pragma clang diagnostic ignored "-Wpedantic"
  #define CTRACK_DISABLE_EXECUTION_POLICY 1
  #include "ctrack.hpp"
  #pragma clang diagnostic pop
@Compaile
Copy link
Copy Markdown
Owner

Compaile commented Nov 8, 2024

Good point, will review shortly

@Compaile Compaile merged commit 784dc97 into Compaile:main Nov 12, 2024
@Compaile
Copy link
Copy Markdown
Owner

Thanks for the pr

@pamarcos
Copy link
Copy Markdown
Contributor Author

Thank you for your work on this lightweight and very easy to integrate and use library. Cheers 🍻

@pamarcos pamarcos deleted the fix_warnings branch November 12, 2024 10:48
Compaile added a commit that referenced this pull request May 28, 2025
Fix warnings to allow using the header on pedantic projects
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.

2 participants