Skip to content

Silence C warning "arrays with different qualifiers"#302

Merged
LecrisUT merged 2 commits intospglib:developfrom
LecrisUT:silence-c-warning
Jun 19, 2023
Merged

Silence C warning "arrays with different qualifiers"#302
LecrisUT merged 2 commits intospglib:developfrom
LecrisUT:silence-c-warning

Conversation

@LecrisUT
Copy link
Copy Markdown
Collaborator

@LecrisUT LecrisUT commented Jun 18, 2023

Bumped the C standard used in the CI to C23. This should silence the warning.

~~This is not a viable solution because in practice we should only require C17 or C11 standard for now. I will make a proper warning suppression for these specific warnings. For now I just want to check that in the future it is automatically resolved ~~

So bumping to C23 indeed silences the warning, but it is too early to apply that standard. Instead I've disabled -Wpedantic with a TODO for when C23 is applied. Note that #297 is an alternative to the compiler warnings where we have more flexibility to disable these warnings.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 18, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d6fcbe8) 86.09% compared to head (439e337) 86.09%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #302   +/-   ##
========================================
  Coverage    86.09%   86.09%           
========================================
  Files           23       23           
  Lines         6069     6069           
========================================
  Hits          5225     5225           
  Misses         844      844           
Flag Coverage Δ
c_api 76.50% <ø> (ø)
fortran_api 37.46% <ø> (ø)
python_api 82.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@LecrisUT LecrisUT requested a review from lan496 June 18, 2023 13:32
@LecrisUT LecrisUT marked this pull request as ready for review June 18, 2023 13:33
LecrisUT added 2 commits June 19, 2023 11:44
Signed-off-by: Cristian Le <[email protected]>
- There is no way to disable the specific `arrays with different qualifiers` warnings, and it otherwise produces a warning spam. This is however a bug in the pre C23 standard language and actual C compilers are not using the buggy language
- Alternatively remove all warnings in favor of `clang-tidy`

Signed-off-by: Cristian Le <[email protected]>
@LecrisUT LecrisUT force-pushed the silence-c-warning branch from 439e337 to f7a3c48 Compare June 19, 2023 09:45
@LecrisUT LecrisUT merged commit 4cc2dbb into spglib:develop Jun 19, 2023
@LecrisUT LecrisUT deleted the silence-c-warning branch June 19, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants