musescore / musescore/MuseScore
MSVC compiler warnings stemming from Qt header files
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Other type of issue
Description with steps to reproduce
When building MuseScore Studio using MSVC, there show very many compiler warnings reg. "unreachable code" (C4702), all stemming from 3 Qt header files, qvariant.h (77 warnings), qjsengine.h (389 warnings) and qjsprimitivevalue.h (22 warnings).
Besides being just annoying they can also cause missing the tree in the forrest, the valid compiler warning in code we own and control and want to knoe about and react upon.
Also this prevents the use of compiler options that causes warnings to be treated as errors (MSVC: /WX, gcc: -Werror), which would be usefull esp. on GitHub CI
Supporting files, videos and screenshots
n/a
In which versions of MuseScore Studio is this issue present?
all versions
Regression
Yes, this used to work in MuseScore 3.x and now is broken
To be fair: Mu3 used a different (older) Qt version...
Operating system
Windows 11
Additional context
n/a
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows 11 MSVC build and record the C4702 warnings from qvariant.h, qjsengine.h, and qjsprimitivevalue.h. Start by inspecting how Qt headers and compiler warning options are configured in the build, then compare the current behavior with MuseScore 3.x if available. Done means these third-party warnings no longer obscure project warnings and warning-as-error options can be used as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100