From af442b177f16cf7ec687b41124463a2bb6c22b52 Mon Sep 17 00:00:00 2001 From: donghongweng Date: Mon, 15 Aug 2022 20:53:51 +0800 Subject: [PATCH] Explicit conversion Test: m tests Change-Id: Ie0c00a51dee1d97239b0ef6f29334d176ddec32a --- vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp index 791d7e8613..f50a5e744f 100644 --- a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp +++ b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp @@ -444,7 +444,7 @@ TEST_P(VibratorAidl, ComposeValidPrimitives) { effect.delayMs = std::rand() % (maxDelay + 1); effect.primitive = primitive; - effect.scale = static_cast(std::rand()) / RAND_MAX; + effect.scale = static_cast(std::rand()) / static_cast(RAND_MAX); composite.emplace_back(effect); if (composite.size() == maxSize) {