diff --git a/interfaces/plugin/src/sensor_napi_utils.cpp b/interfaces/plugin/src/sensor_napi_utils.cpp index 2a706d709a05897ee1d6bec27dd66ebbd2412d73..34eb1113962e65984f444e7705f7da401af56826 100644 --- a/interfaces/plugin/src/sensor_napi_utils.cpp +++ b/interfaces/plugin/src/sensor_napi_utils.cpp @@ -273,8 +273,8 @@ void ConvertToSensorData(napi_env env, AsyncCallbackInfo *asyncCallbackInfo, nap napi_get_undefined(env, &result[0]); int32_t sensorTypeId = asyncCallbackInfo->data.sensorData.sensorTypeId; if ((g_sensorAttributeList.count(sensorTypeId)) == 0 - || (static_cast(g_sensorAttributeList[sensorTypeId].size()) - > (asyncCallbackInfo->data.sensorData.dataLength / sizeof(float)))) { + || g_sensorAttributeList[sensorTypeId].size() + > (asyncCallbackInfo->data.sensorData.dataLength / sizeof(float))) { HiLog::Error(LABEL, "%{public}s count of sensorTypeId is zero", __func__); return; } diff --git a/utils/include/sensor_channel_info.h b/utils/include/sensor_channel_info.h old mode 100755 new mode 100644 index 30084350d65297b9cca4a4f79e8c6df1abdef0ca..9698153cf66a7ac5bdc3e0471a5715278875e15c --- a/utils/include/sensor_channel_info.h +++ b/utils/include/sensor_channel_info.h @@ -35,7 +35,7 @@ public: int64_t GetSamplingPeriodNs() const; void SetSamplingPeriodNs(int64_t samplingPeriodNs); int32_t GetFifoCount() const; - void SetFifoCount(int32_t fifoCount); + void SetFifoCount(uint32_t fifoCount); std::vector GetCmdType() const; void SetCmdType(const std::vector &cmdType); diff --git a/utils/src/sensor_channel_info.cpp b/utils/src/sensor_channel_info.cpp old mode 100755 new mode 100644 index f844a45aaaa9ad2054b6971cab1db01ce440836d..885c1f49100f645b5b19fe26efca4deffedc5981 --- a/utils/src/sensor_channel_info.cpp +++ b/utils/src/sensor_channel_info.cpp @@ -65,7 +65,7 @@ int32_t SensorChannelInfo::GetFifoCount() const return fifoCount_; } -void SensorChannelInfo::SetFifoCount(int32_t fifoCount) +void SensorChannelInfo::SetFifoCount(uint32_t fifoCount) { fifoCount_ = fifoCount; }