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

Add -Wno-format-truncation to root project #2719

Draft
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

thomas-bc
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

  • Attempt to fix the Autodocs CI failure by disabling the format-truncation warnings
  • Run autodocs as part of regular CI checks. It is a fairly quick workflow (<5mins) and it's not the first time that it not being ran on PRs is playing tricks on us.

Rationale

Format truncation are an expected behavior

@@ -56,6 +56,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
$<$<COMPILE_LANGUAGE:CXX>:-Wno-vla-extension>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-zero-length-array>
)
else()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something special about autodocs that triggers truncation warnings? I would have expected that truncation would be failing on normal gcc builds as part of CI.

I'm a little leary of conditionally disabling format truncation only if the compiler isn't clang. Maybe consider always disable the format truncation warning if we're not ready to resolve it yet?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that clang does not support this flag. Thus we cannot disable it on clang.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Maybe just add the flag if the compiler is GCC so we don't break in weird ways on unexpected compilers? That being said I think it's unlikely enough that somebody would build the root cmake project on an odd compiler, so maybe not a significant concern.

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.

None yet

3 participants