[XS] Change in fuchsia/fuchsia[main]: [media][audio] Fix -Wimplicit-int-conversion errors

0 views
Skip to first unread message

'Paul Kirth (Gerrit)' via owners-override

unread,
Mar 28, 2025, 8:22:43 PM (13 days ago) Mar 28
to Owners Override
Attention needed from Dustin Green, Martin Puryear, Owners Override and Yegor Pomortsev

Paul Kirth has uploaded the change for review

Paul Kirth would like Owners Override to review this change.

Commit message

[media][audio] Fix -Wimplicit-int-conversion errors

New versions of clang will start warning about more cases when the
conversion happens.
Bug: 402753152
Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b

Change diff

diff --git a/src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h b/src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
index 9ca1fd5..68300c8 100644
--- a/src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
+++ b/src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
@@ -376,7 +376,7 @@
AudioBuffer<fuchsia::media::AudioSampleFormat::SIGNED_16>* audio_buffer_ptr) {
auto& samples = audio_buffer_ptr->samples();
for (std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT& sample : samples) {
- sample = -sample;
+ sample = static_cast<std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT>(-sample);
}
}

@@ -499,7 +499,7 @@
AudioBuffer<fuchsia::media::AudioSampleFormat::SIGNED_16>* audio_buffer_ptr) {
auto& samples = audio_buffer_ptr->samples();
for (std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT& sample : samples) {
- sample = -sample;
+ sample = static_cast<std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT>(-sample);
}
}

Change information

Files:
  • M src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
Change size: XS
Delta: 1 file changed, 2 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Dustin Green
  • Martin Puryear
  • Owners Override
  • Yegor Pomortsev
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 4
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Martin Puryear <mpur...@google.com>
Gerrit-Attention: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Dustin Green <dusti...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/5cef959857b3bad6f5d268da6d46ea639512b5b9-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
open
diffy

'James Robinson (Gerrit)' via owners-override

unread,
Mar 28, 2025, 8:36:16 PM (13 days ago) Mar 28
to Paul Kirth, Owners Override, Yegor Pomortsev, GI Try Builder, CQ Bot, Dustin Green, Martin Puryear
Attention needed from Dustin Green, Martin Puryear, Owners Override, Paul Kirth and Yegor Pomortsev

James Robinson voted and added 2 comments

Votes added by James Robinson

Code-Review+2
Owners-Override+1

2 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
James Robinson . resolved

Setting O-O to unblock the clang roll.

I do think this is worth some follow-up by the code owners, see comment below.

File src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
Line 379, Patchset 4 (Latest): sample = static_cast<std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT>(-sample);
James Robinson . unresolved

can we make this a local type alias to avoid repeating it in the loop and here?

this does bring up the point of what is this logic expected to do given a sample of std::numeric_limits<SampleT>::min() whose inversion is not representable in the type

Open in Gerrit

Related details

Attention is currently required from:
  • Dustin Green
  • Martin Puryear
  • Owners Override
  • Paul Kirth
  • Yegor Pomortsev
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 4
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Paul Kirth <paul...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Martin Puryear <mpur...@google.com>
Gerrit-Attention: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Dustin Green <dusti...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 20:36:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/b8bc7cfc342c6397e64651d85cb0622d20bdff10-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Paul Kirth (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:32:19 PM (13 days ago) Mar 28
to James Robinson, Owners Override, Yegor Pomortsev, GI Try Builder, CQ Bot, Dustin Green, Martin Puryear
Attention needed from Dustin Green, James Robinson, Martin Puryear, Owners Override and Yegor Pomortsev

Paul Kirth added 2 comments

File src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
Line 379, Patchset 4 (Latest): sample = static_cast<std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT>(-sample);
James Robinson . resolved

can we make this a local type alias to avoid repeating it in the loop and here?

this does bring up the point of what is this logic expected to do given a sample of std::numeric_limits<SampleT>::min() whose inversion is not representable in the type

Paul Kirth

Fix applied.

Line 379, Patchset 4 (Latest): sample = static_cast<std::remove_pointer_t<decltype(audio_buffer_ptr)>::SampleT>(-sample);
James Robinson . unresolved

can we make this a local type alias to avoid repeating it in the loop and here?

this does bring up the point of what is this logic expected to do given a sample of std::numeric_limits<SampleT>::min() whose inversion is not representable in the type

Paul Kirth

Fix applied. Surprised the AI seemed to do this correctly 😊.

Not sure how to answer your question regarding the logic, though. To get around the new warning and unblock our CI I was mostly just trying to keep the existing logic in place.

I'll leave this unresolved in case you want to hold off landing.

Open in Gerrit

Related details

Attention is currently required from:
  • Dustin Green
  • James Robinson
  • Martin Puryear
  • Owners Override
  • Yegor Pomortsev
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 4
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Martin Puryear <mpur...@google.com>
Gerrit-Attention: James Robinson <jam...@google.com>
Gerrit-Attention: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Dustin Green <dusti...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 21:32:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: James Robinson <jam...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/c24a3cdc2d08ad472809fed177516b4a3d4a753c-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Paul Kirth (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:33:08 PM (13 days ago) Mar 28
to Auto-Submit, James Robinson, Owners Override, Yegor Pomortsev, GI Try Builder, CQ Bot, Dustin Green, Martin Puryear
Attention needed from Dustin Green, James Robinson, Martin Puryear, Owners Override and Yegor Pomortsev

Paul Kirth added 1 comment

Patchset-level comments
Paul Kirth . unresolved

Or now I'll mark it unresolved

Open in Gerrit

Related details

Attention is currently required from:
  • Dustin Green
  • James Robinson
  • Martin Puryear
  • Owners Override
  • Yegor Pomortsev
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 4
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Martin Puryear <mpur...@google.com>
Gerrit-Attention: James Robinson <jam...@google.com>
Gerrit-Attention: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Dustin Green <dusti...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 21:32:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/3008d80ca5c7a766a02501a773b0fad5b38968a5-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:41:03 PM (13 days ago) Mar 28
to Paul Kirth, Auto-Submit, James Robinson, Owners Override, Yegor Pomortsev, GI Try Builder, Dustin Green, Martin Puryear

CQ Bot submitted the change

Change information

Commit message:
[media][audio] Fix -Wimplicit-int-conversion errors

New versions of clang will start warning about more cases when the
conversion happens.
Bug: 402753152
Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Reviewed-by: James Robinson <jam...@google.com>
Owners-Override: James Robinson <jam...@google.com>
Fuchsia-Auto-Submit: Paul Kirth <paul...@google.com>
Files:
  • M src/media/audio/audio_core/test/api/audio_renderer_pipeline_test_shared.h
Change size: XS
Delta: 1 file changed, 2 insertions(+), 2 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by James Robinson
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 5
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/2a38dc829d5f6267c410ae8d85a74332049347f8-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'James Robinson (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:43:24 PM (13 days ago) Mar 28
to Paul Kirth, CQ Bot, Auto-Submit, Owners Override, Yegor Pomortsev, GI Try Builder, Dustin Green, Martin Puryear
Attention needed from Paul Kirth

James Robinson added 1 comment

Patchset-level comments
Paul Kirth . unresolved

Or now I'll mark it unresolved

James Robinson

This is preserving behavior so I think it's valid to land and have the owners take a look later.

Open in Gerrit

Related details

Attention is currently required from:
  • Paul Kirth
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 5
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Paul Kirth <paul...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 21:43:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Kirth <paul...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/8161fe05d667d8611d76751bb1a7de21f834cc06-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'GI Roller (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:44:09 PM (13 days ago) Mar 28
to Paul Kirth, CQ Bot, Auto-Submit, James Robinson, Owners Override, Yegor Pomortsev, GI Try Builder, Dustin Green, Martin Puryear
Attention needed from Paul Kirth

Message from GI Roller

Open in Gerrit

Related details

Attention is currently required from:
  • Paul Kirth
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 5
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Attention: Paul Kirth <paul...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 21:44:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/1cd5b42b5452911298604c684c951b1f5eea85fc-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Paul Kirth (Gerrit)' via owners-override

unread,
Mar 28, 2025, 9:45:48 PM (13 days ago) Mar 28
to CQ Bot, GI Roller, Auto-Submit, James Robinson, Owners Override, Yegor Pomortsev, GI Try Builder, Dustin Green, Martin Puryear

Paul Kirth added 1 comment

Patchset-level comments
File-level comment, Patchset 4:
Paul Kirth . resolved

Or now I'll mark it unresolved

James Robinson

This is preserving behavior so I think it's valid to land and have the owners take a look later.

Paul Kirth

Acknowledged

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I9d192261d03b9bfc8c5a7e63f487fb19ad6c701b
Gerrit-Change-Number: 1238872
Gerrit-PatchSet: 5
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Dustin Green <dusti...@google.com>
Gerrit-Reviewer: James Robinson <jam...@google.com>
Gerrit-Reviewer: Martin Puryear <mpur...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Yegor Pomortsev <ypomo...@google.com>
Gerrit-Comment-Date: Fri, 28 Mar 2025 21:45:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Kirth <paul...@google.com>
Comment-In-Reply-To: James Robinson <jam...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/58976db91884b75081cb26f38e08ddb3f55d14d5-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages