diff options
author | ShevT <shev_t@mail.ru> | 2018-07-26 11:47:47 +0300 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2018-11-02 17:59:09 +0000 |
commit | 9d98a6ac9360d76228e5440501b9eba774501c3d (patch) | |
tree | 603825971238841570a6cd16082862724a3d627b /healthd | |
parent | 6d7c8fcc92c4914dc01de4f82ac3b39abebff264 (diff) | |
download | system_core-9d98a6ac9360d76228e5440501b9eba774501c3d.tar.gz system_core-9d98a6ac9360d76228e5440501b9eba774501c3d.tar.bz2 system_core-9d98a6ac9360d76228e5440501b9eba774501c3d.zip |
healthd: BatteryMonitor: Fix compiler warning
system/core/healthd/BatteryMonitor.cpp:248:19: note: initialize the variable 'i' to silence this warning
unsigned int i;
^
= 0
1 warning generated.
Change-Id: Ib2fa0061d657fd93871ca8a9056d173d5b7ab58d
Diffstat (limited to 'healthd')
-rw-r--r-- | healthd/BatteryMonitor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index 2a5667c37..a1519da3b 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -240,10 +240,9 @@ bool BatteryMonitor::update(void) { if (readFromFile(mHealthdConfig->batteryTechnologyPath, &buf) > 0) props.batteryTechnology = String8(buf.c_str()); - unsigned int i; double MaxPower = 0; - for (i = 0; i < mChargerNames.size(); i++) { + for (size_t i = 0; i < mChargerNames.size(); i++) { String8 path; path.appendFormat("%s/%s/online", POWER_SUPPLY_SYSFS_PATH, mChargerNames[i].string()); |