Skip to content

Remove obsolete (and loud) warning ‘-Wno-unused-member-function’ - #8242

Merged
poshul merged 5 commits into
developfrom
no-unused-member-func
Oct 14, 2025
Merged

poshul merged 5 commits into
developfrom
no-unused-member-func

Conversation

@poshul

@poshul poshul commented Oct 2, 2025 •

Copy link
Copy Markdown
Collaborator

cleans up compiler warning:

cc1plus: note: unrecognized command-line option ‘-Wno-unused-member-function’ may have been intended to silence earlier diagnostics

Description

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Summary by CodeRabbit

  • Chores
    • Adjusted build warning suppression to yield clearer, more consistent build output across platforms and compilers.
    • Continues to preserve deprecation handling for affected Python versions.
    • No changes to public APIs or runtime behavior; installation unchanged.
    • Build logs may now show warnings that were previously suppressed; no user action required.

cleans up compiler warning: 
```
cc1plus: note: unrecognized command-line option ‘-Wno-unused-member-function’ may have been intended to silence earlier diagnostics
```
@coderabbitai

coderabbitai Bot commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Conditionalized EXTRA_WARNINGS in src/pyOpenMS/CMakeLists.txt: when using Clang (on Linux/Apple) keep -Wno-unused-member-function alongside existing suppressions; for non-Clang compilers drop -Wno-unused-member-function while retaining -Wno-builtin-macro-redefined, -Wno-unused, -Wno-zero-as-null-pointer-constant, and the existing -Wno-deprecated-declarations conditional for Python 3.8–3.9. No API or runtime behavior changes.

Changes

Cohort / File(s) Summary of Changes
Build warnings configuration
src/pyOpenMS/CMakeLists.txt
Added compiler-based conditional: for Clang keep -Wno-unused-member-function in EXTRA_WARNINGS; for non-Clang remove -Wno-unused-member-function. Kept -Wno-builtin-macro-redefined, -Wno-unused, -Wno-zero-as-null-pointer-constant, and the Python 3.8–3.9 -Wno-deprecated-declarations conditional unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer (CMake)
  participant CMake as CMake Configure
  participant Compiler as Compiler

  Dev->>CMake: Run configure for pyOpenMS
  CMake->>Compiler: Detect compiler type
  alt Compiler is Clang (Linux/Apple)
    note right of CMake #DDEBF7: Clang path\n(EXTRA_WARNINGS includes\n`-Wno-unused-member-function`)
    CMake->>CMake: Append full EXTRA_WARNINGS set
  else Compiler is non-Clang
    note right of CMake #F7F2DD: Non-Clang path\n(`-Wno-unused-member-function` omitted)
    CMake->>CMake: Append reduced EXTRA_WARNINGS set
  end
  CMake->>Dev: Generate build files (warnings set)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble flags like clover sweet,
one flag stays if Clang I meet.
Fewer rustles when others roam,
tidy warnings, tidy home.
Hop, compile — a cleaner beat. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the main change by specifying the removal of the ‘-Wno-unused-member-function’ warning flag and highlights its obsolete and noisy behavior, directly reflecting the adjustments in CMakeLists.txt. It is concise and specific, allowing anyone reviewing the project history to immediately understand the PR’s purpose. The phrasing avoids extraneous detail while clearly indicating the primary developer intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch no-unused-member-func

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3013fa and 6c091ce.

📒 Files selected for processing (1)
  • src/pyOpenMS/CMakeLists.txt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pyOpenMS/CMakeLists.txt

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@timosachsenberg

Copy link
Copy Markdown
Contributor

I think this unrecognized compiler option might be compiler dependent. @jpfeuffer do you know if the warning @poshul wants to remove is needed?

@jpfeuffer

Copy link
Copy Markdown
Contributor

Where does this warning show up? Which compiler?

@jpfeuffer

Copy link
Copy Markdown
Contributor

Yes seems to be clang specific. Should be guarded accordingly then. I assume you would get loud warnings if you remove it there then.
I think I introduced it because cython can sometimes produce those warnings.

@timosachsenberg

Copy link
Copy Markdown
Contributor

Ok so just check for clang?

@timosachsenberg

Copy link
Copy Markdown
Contributor

Looks good to me. Not sure if there is a shorter way to get the compiler in our build system.

@jpfeuffer

Copy link
Copy Markdown
Contributor

I think it's correct, although a list append might have been slightly less maintenance in the future.

@jpfeuffer

Copy link
Copy Markdown
Contributor

@copilot Use list append

@timosachsenberg

Copy link
Copy Markdown
Contributor

@copilot do it

@timosachsenberg

Copy link
Copy Markdown
Contributor

too lazy I guess

@timosachsenberg

Copy link
Copy Markdown
Contributor

@poshul maybe it listens to you ;)

@poshul
poshul enabled auto-merge (squash) October 13, 2025 11:46
@poshul
poshul disabled auto-merge October 14, 2025 14:41
@poshul
poshul merged commit 06b78e2 into develop Oct 14, 2025
@poshul
poshul deleted the no-unused-member-func branch October 14, 2025 14:41
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.

4 participants