Merge "Fix cert-dcl16-c warnings"

This commit is contained in:
Chih-hung Hsieh
2022-02-10 18:30:38 +00:00
committed by Gerrit Code Review
3 changed files with 7 additions and 8 deletions

View File

@@ -274,7 +274,7 @@ class Nint : public Int {
virtual std::unique_ptr<Item> clone() const override { return std::make_unique<Nint>(mValue); } virtual std::unique_ptr<Item> clone() const override { return std::make_unique<Nint>(mValue); }
private: private:
uint64_t addlInfo() const { return -1ll - mValue; } uint64_t addlInfo() const { return -1LL - mValue; }
int64_t mValue; int64_t mValue;
}; };

View File

@@ -203,9 +203,8 @@ struct CodecObserver : public IOmxObserver {
} }
int64_t delayUs = finishBy - android::ALooper::GetNowUs(); int64_t delayUs = finishBy - android::ALooper::GetNowUs();
if (delayUs < 0) return toStatus(android::TIMED_OUT); if (delayUs < 0) return toStatus(android::TIMED_OUT);
(timeoutUs < 0) (timeoutUs < 0) ? msgCondition.wait(msgLock)
? msgCondition.wait(msgLock) : msgCondition.waitRelative(msgLock, delayUs * 1000LL);
: msgCondition.waitRelative(msgLock, delayUs * 1000ll);
} }
} }

View File

@@ -59,10 +59,10 @@ const SensorInfo& Sensor::getSensorInfo() const {
} }
void Sensor::batch(int64_t samplingPeriodNs) { void Sensor::batch(int64_t samplingPeriodNs) {
if (samplingPeriodNs < mSensorInfo.minDelay * 1000ll) { if (samplingPeriodNs < mSensorInfo.minDelay * 1000LL) {
samplingPeriodNs = mSensorInfo.minDelay * 1000ll; samplingPeriodNs = mSensorInfo.minDelay * 1000LL;
} else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000ll) { } else if (samplingPeriodNs > mSensorInfo.maxDelay * 1000LL) {
samplingPeriodNs = mSensorInfo.maxDelay * 1000ll; samplingPeriodNs = mSensorInfo.maxDelay * 1000LL;
} }
if (mSamplingPeriodNs != samplingPeriodNs) { if (mSamplingPeriodNs != samplingPeriodNs) {