Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d98a6ac authored by ShevT's avatar ShevT Committed by Bruno Martins
Browse files

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
parent 6d7c8fcc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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());