Skip to content

Commit

Permalink
healthd: BatteryMonitor: Fix compiler warning
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ShevT authored and YumeMichi committed Dec 9, 2018
1 parent e5dc5bf commit bd40f62
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions healthd/BatteryMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ bool BatteryMonitor::update(void) {
if (readFromFile(mHealthdConfig->batteryTechnologyPath, &buf) > 0)
props.batteryTechnology = String8(buf.c_str());

unsigned int i;
double MaxPower = 0;

// Rescan for the available charger types
Expand Down Expand Up @@ -275,7 +274,7 @@ bool BatteryMonitor::update(void) {
}
}

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());
Expand Down

0 comments on commit bd40f62

Please sign in to comment.