Bug 486210

Summary: Missing future-proofing "fix" for clang >= 16
Product: [Frameworks and Libraries] Phonon Reporter: RJVB <rjvbertin>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: normal CC: myriam, romain.perier, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description RJVB 2024-04-27 16:46:14 UTC
SUMMARY
Commit #069d5a3eb81bcbc730e44c27a0d060a85cf9213d introduced a fix for the default `-Werror=enum-constexpr-conversion` flag clang-16 introduced. Somehow it was missed that the same fix is needed in `phonon/backendinterface.h`, enum `BackendInterface::Class` (currently line 176)

STEPS TO REPRODUCE
1. Build phonon with clang >=16, or with GCC with the `-Wconversion` flag

OBSERVED RESULT
Clang-16+ will give errors and GCC warnings that can be traced back to the aforementioned class.

EXPECTED RESULT
No errors/warnings.

SOFTWARE/OS VERSIONS
Any new enough to run clang-16+ and at least phonon 4.11.1 and its dependencies.

ADDITIONAL INFORMATION
Both GCC (12.3.0) and clang (17.0.6) will generate exactly the same library with and without the fix (using `-Wno-error=enum-constexpr-conversion` for clang) (phonon 4.11.1 built in `gnu++11` mode).