Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compile error on older g++ (#34630)
- Older g++ in Ubuntu 20.04LTS seems to have issues with invalidly doing integer promotion in some cases where it otherwise should not happen. This broke for some developers with: ``` ../../third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp: In member function ‘void chip::app::Clusters::WaterHeaterManagement::WaterHeaterManagementDelegate::DrawOffHotWater(chip::Percent, uint16_t)’: ../../third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp:306:29: error: conversion from ‘int’ to ‘chip::Percent’ {aka ‘unsigned char’} may change value [-Werror=conversion] 306 | mTankPercentage -= percentageReplaced; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ At global scope: cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror] cc1plus: all warnings being treated as errors [17/171] c++ obj/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/src/chip-all-clusters-common.device-energy-management-mode.cpp.o ninja: build stopped: subcommand failed. ``` - This PR fixes the issue (validated with one such user).
- Loading branch information