From e9320b7c927a5344122e921cbb76531204eb2dac Mon Sep 17 00:00:00 2001 From: Ruchi Kandoi Date: Mon, 22 Feb 2016 12:46:57 -0800 Subject: [PATCH] healthd: Remove warning by clang compiler. Bug: 27265206 Change-Id: I8f2ec1391952de4a9cdefce0433535608a1e9b59 Signed-off-by: Ruchi Kandoi --- healthd/BatteryMonitor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index 477148bd9..b33dd2883 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -323,11 +323,10 @@ bool BatteryMonitor::update(void) { " cc=%d", props.batteryCycleCount); } } else { - snprintf(dmesgline, sizeof(dmesgline), + len = snprintf(dmesgline, sizeof(dmesgline), "battery none"); } - len = strlen(dmesgline); snprintf(dmesgline + len, sizeof(dmesgline) - len, " chg=%s%s%s", props.chargerAcOnline ? "a" : "", props.chargerUsbOnline ? "u" : "",