Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron25: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>.
Created attachment 248558 [details] devel/electron25: fix build with clang 18
The patch looks good to me. Please feel free to commit it. Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=76cb9bc437fd1e15ff71068d6eeea8c212d844d4 commit 76cb9bc437fd1e15ff71068d6eeea8c212d844d4 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-18 12:59:18 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-02-22 18:41:31 +0000 devel/electron25: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron25: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 Approved by: tagattie (maintainer) MFH: 2024Q1 devel/electron25/Makefile | 2 +- .../patch-cc_layers_mirror__layer__impl.h (new) | 20 ++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 +++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 114 +++++++++++++++++++++ 4 files changed, 149 insertions(+), 1 deletion(-)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1118e30052b8d60b559173b9f5746a024a84ca25 commit 1118e30052b8d60b559173b9f5746a024a84ca25 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-18 12:59:18 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-02-22 18:45:36 +0000 devel/electron25: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron25: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 Approved by: tagattie (maintainer) MFH: 2024Q1 (cherry picked from commit 76cb9bc437fd1e15ff71068d6eeea8c212d844d4) devel/electron25/Makefile | 2 +- .../patch-cc_layers_mirror__layer__impl.h (new) | 20 ++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 +++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 114 +++++++++++++++++++++ 4 files changed, 149 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d5ded9f64f41384f59958ae78dc79468b8365f39 commit d5ded9f64f41384f59958ae78dc79468b8365f39 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:24:57 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:27:54 +0000 devel/electron27: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron27: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 MFH: 2024Q1 .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4c36b9d0387620442dced802e25078a06fb930ce commit 4c36b9d0387620442dced802e25078a06fb930ce Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:26:28 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:27:54 +0000 devel/electron28: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron28: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=664c5df7607834a4345b4bc99490db6681ac06c2 commit 664c5df7607834a4345b4bc99490db6681ac06c2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:22:24 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:27:53 +0000 devel/electron26: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron26: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 MFH: 2024Q1 .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bd8d232aecee6b9a43b67a6b449b700202208ff2 commit bd8d232aecee6b9a43b67a6b449b700202208ff2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:22:24 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:30:26 +0000 devel/electron26: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron26: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 MFH: 2024Q1 (cherry picked from commit 664c5df7607834a4345b4bc99490db6681ac06c2) .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=941d96c740f7276fc73c520427419c2784862c0d commit 941d96c740f7276fc73c520427419c2784862c0d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:24:57 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:30:27 +0000 devel/electron27: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron27: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 MFH: 2024Q1 (cherry picked from commit d5ded9f64f41384f59958ae78dc79468b8365f39) .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)
The tag release/13.3.0 references this bug: URL: https://cgit.FreeBSD.org/ports/tag/?h=release/13.3.0 tag release/13.3.0 Tagger: Colin Percival <cperciva@FreeBSD.org> TaggerDate: 2024-02-23 22:11:23 +0000 Tag 941d96c740f7 of 2024Q1 for 13.3-RELEASE Approved by: portmgr (implicit, re blanket) -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEglY7hNBiDtwN+4ZBOJfy4i5lrT8FAmXZGBgACgkQOJfy4i5l rT8mSg//cGGO+iB85V6OQkGBzSEdTFHNKe5foxwWCCKDbnEJ9LVg7h2yk5DGxt5F RnJYAE3mmtyOiGEdyPKDeRLFa4zzk+YX6LuYe4pNNb2vq6ftHDeBRkeO9Z+3xHjV eCTGMi3Vqsf5v4j/GEGuc0eMrKMIqPQ2tNAVU5W3QJcW7VtJcSqffy2loL6o3sUo SZKiT6hg4q+yimTwupYaagzELbcQbYKOpPjG3rGiAzAL1wFsdmRsMMIcc3zQTp9K KQfg3TEuTf8/9g/Le5TCaI0QKPwailgHSdAySQaZOwkrbh6C640nC9Xabt/e7nqC W5zNVHd3zVBF8mfQ6XTrk7fNI8tSg3r+cLEc+xbMPoZKsvhCq5xvwEDBtejH75Jp t5L0vpSG80g7ZzlAV8PY1Y/nOPIrjFkvG2+Ui5Zg18+UrBC+/gksI7/DFPWXubbp THCaLWhKBzAGWxC+9LP2x+oLf+pR7GdecQIwaBMavuwMVKiHImGV/1zeQSrLzjkR gt3t1diT3fNeEGC3z0S6WUrIKa3SGqhRaeeN02PTYVAd/72hWlRoOW5pldvQhzkD R+AAEnd0Aj2Vr8EXwdGOjDKFu5zOVOcAlXIauk/7Mtzg77Gx0Z1LoyLSopoT+ux8 NZmkRXq/PVviYIW7yYZTByJWLqW/dKqWhrglknZcS9qfz0erMK4= =KtzH -----END PGP SIGNATURE----- commit 941d96c740f7276fc73c520427419c2784862c0d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-22 21:24:57 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2024-02-22 21:30:27 +0000 devel/electron27: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron27: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking <https://webrtc.googlesource.com/src/+/267f9bdd53> into the thirdparty directory. The second batch of errors can be fixed by cherry-picking <https://chromium.googlesource.com/chromium/src/+/5e9fb4130a537>. PR: 277129 MFH: 2024Q1 (cherry picked from commit d5ded9f64f41384f59958ae78dc79468b8365f39) .../patch-cc_layers_mirror__layer__impl.h (new) | 20 +++++ ...trics_energy__metrics__provider__linux.cc (new) | 14 ++++ ...rty_webrtc_pc_legacy__stats__collector.cc (new) | 98 ++++++++++++++++++++++ 3 files changed, 132 insertions(+)