diff options
author | Dylan Reid <dgreid@chromium.org> | 2020-04-17 21:49:33 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-23 21:18:10 +0000 |
commit | 057969303b1687a12b2d8edfd4a738c3facc191a (patch) | |
tree | 04c41c69ead8f06d9331f6ea05e61cb2f1aeb716 /cras | |
parent | b359289f972f73702fc887b8798906a047c1b34d (diff) | |
download | adhd-057969303b1687a12b2d8edfd4a738c3facc191a.tar.gz |
CRAS: a2dp - fix some warnings with newer clang
signed/unsigned comparisons and unused variables in the unit tests.
Change-Id: I0e04a55c5c45faec43eb981a7a9795d9b487bac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2155147
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'cras')
-rw-r--r-- | cras/src/server/cras_a2dp_iodev.c | 8 | ||||
-rw-r--r-- | cras/src/tests/a2dp_iodev_unittest.cc | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/cras/src/server/cras_a2dp_iodev.c b/cras/src/server/cras_a2dp_iodev.c index 5169e07c..f2285f88 100644 --- a/cras/src/server/cras_a2dp_iodev.c +++ b/cras/src/server/cras_a2dp_iodev.c @@ -97,7 +97,7 @@ static int update_supported_formats(struct cras_iodev *iodev) return 0; } -static int bt_local_queued_frames(const struct cras_iodev *iodev) +static unsigned int bt_local_queued_frames(const struct cras_iodev *iodev) { struct a2dp_io *a2dpio = (struct a2dp_io *)iodev; return a2dp_queued_frames(&a2dpio->a2dp) + @@ -120,7 +120,7 @@ static int frames_queued(const struct cras_iodev *iodev, */ static int fill_zeros_to_min_buffer_level(struct cras_iodev *iodev) { - int local_queued_frames = bt_local_queued_frames(iodev); + unsigned int local_queued_frames = bt_local_queued_frames(iodev); if (local_queued_frames < iodev->min_buffer_level) return cras_iodev_fill_odev_zeros( @@ -137,7 +137,7 @@ static int fill_zeros_to_min_buffer_level(struct cras_iodev *iodev) */ static int output_underrun(struct cras_iodev *iodev) { - int local_queued_frames = bt_local_queued_frames(iodev); + unsigned int local_queued_frames = bt_local_queued_frames(iodev); /* * Examples to help understand the check: @@ -378,7 +378,7 @@ static int encode_and_flush(const struct cras_iodev *iodev) int err; size_t format_bytes; int written = 0; - int queued_frames; + unsigned int queued_frames; struct a2dp_io *a2dpio; struct cras_bt_device *device; struct timespec now; diff --git a/cras/src/tests/a2dp_iodev_unittest.cc b/cras/src/tests/a2dp_iodev_unittest.cc index 7f2968c2..ba75c33a 100644 --- a/cras/src/tests/a2dp_iodev_unittest.cc +++ b/cras/src/tests/a2dp_iodev_unittest.cc @@ -426,10 +426,8 @@ TEST_F(A2dpIodev, FlushAtLowBufferLevel) { struct cras_audio_area* area; struct timespec tstamp; unsigned frames; - struct a2dp_io* a2dpio; iodev = a2dp_iodev_create(fake_transport); - a2dpio = (struct a2dp_io*)iodev; iodev_set_format(iodev, &format); iodev->configure_dev(iodev); |