From 731802e831fcf1d17b4b13ca9296336958c51308 Mon Sep 17 00:00:00 2001 From: qijinquan Date: Fri, 26 Aug 2022 15:41:54 +0800 Subject: [PATCH] fix: Modify the warning "Only the unsigned integer can use bitwise operations" Signed-off-by: qijinquan --- codec/hal/idl_service/src/icodec_buffer.cpp | 2 +- codec/hal/v2.0/hdi_impl/src/icodec_buffer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codec/hal/idl_service/src/icodec_buffer.cpp b/codec/hal/idl_service/src/icodec_buffer.cpp index f5c7df02f3..37f97e6e11 100644 --- a/codec/hal/idl_service/src/icodec_buffer.cpp +++ b/codec/hal/idl_service/src/icodec_buffer.cpp @@ -137,7 +137,7 @@ int32_t ICodecBuffer::SyncWait(int fd, uint32_t timeout) retCode = -EPERM; errno = ETIME; } else if (retCode > 0) { - if (pollfds.revents & (POLLERR | POLLNVAL)) { + if (static_cast(pollfds.revents) & (POLLERR | POLLNVAL)) { retCode = -EPERM; errno = EINVAL; } diff --git a/codec/hal/v2.0/hdi_impl/src/icodec_buffer.cpp b/codec/hal/v2.0/hdi_impl/src/icodec_buffer.cpp index fd45f291be..3896e66998 100644 --- a/codec/hal/v2.0/hdi_impl/src/icodec_buffer.cpp +++ b/codec/hal/v2.0/hdi_impl/src/icodec_buffer.cpp @@ -105,7 +105,7 @@ int32_t ICodecBuffer::SyncWait(int fd, uint32_t timeout) retCode = -EPERM; errno = ETIME; } else if (retCode > 0) { - if (pollfds.revents & (POLLERR | POLLNVAL)) { + if (static_cast(pollfds.revents) & (POLLERR | POLLNVAL)) { retCode = -EPERM; errno = EINVAL; } -- Gitee