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

Commit 47119ad6 authored by Andreas Gampe's avatar Andreas Gampe Committed by Android Git Automerger
Browse files

am 1897a8e2: am 9ade8c1a: Merge "Frameworks/base: Wall Werror in libs/storage"

* commit '1897a8e2':
  Frameworks/base: Wall Werror in libs/storage
parents 3c3bd8a4 1897a8e2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,4 +9,6 @@ LOCAL_SRC_FILES:= \

LOCAL_MODULE:= libstorage

LOCAL_CFLAGS += -Wall -Werror

include $(BUILD_STATIC_LIBRARY)
+12 −5
Original line number Diff line number Diff line
@@ -207,12 +207,19 @@ public:
            ALOGD("getStorageUsers caught exception %d\n", err);
            return err;
        }
        const int32_t numUsers = reply.readInt32();
        int32_t numUsersI = reply.readInt32();
        uint32_t numUsers;
        if (numUsersI < 0) {
            ALOGW("Number of users is negative: %d\n", numUsersI);
            numUsers = 0;
        } else {
            numUsers = static_cast<uint32_t>(numUsersI);
        }
        *users = (int32_t*)malloc(sizeof(int32_t)*numUsers);
        for (int i = 0; i < numUsers; i++) {
        for (size_t i = 0; i < numUsers; i++) {
            **users++ = reply.readInt32();
        }
        return numUsers;
        return static_cast<int32_t>(numUsers);
    }

    int32_t getVolumeState(const String16& mountPoint)
@@ -546,8 +553,8 @@ public:
    }
};

IMPLEMENT_META_INTERFACE(MountService, "IMountService");
IMPLEMENT_META_INTERFACE(MountService, "IMountService")

// ----------------------------------------------------------------------

};
}
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ status_t BnMountServiceListener::onTransact(
            onUsbMassStorageConnectionChanged(connected);
            reply->writeNoException();
            return NO_ERROR;
        } break;
        }
        case TRANSACTION_onStorageStateChanged: {
            CHECK_INTERFACE(IMountServiceListener, data, reply);
            String16 path = data.readString16();
@@ -50,4 +50,4 @@ status_t BnMountServiceListener::onTransact(
}
// ----------------------------------------------------------------------

};
}
+2 −2
Original line number Diff line number Diff line
@@ -33,11 +33,11 @@ status_t BnMountShutdownObserver::onTransact(
            onShutDownComplete(statusCode);
            reply->writeNoException();
            return NO_ERROR;
        } break;
        }
        default:
            return BBinder::onTransact(code, data, reply, flags);
    }
}
// ----------------------------------------------------------------------

};
}
+5 −4
Original line number Diff line number Diff line
@@ -30,10 +30,11 @@ public:
        : BpInterface<IObbActionListener>(impl)
    { }

    virtual void onObbResult(const String16& filename, const int32_t nonce, const int32_t state) { }
    virtual void onObbResult(const String16& /* filename */, const int32_t /* nonce */,
                             const int32_t /* state */) { }
};

IMPLEMENT_META_INTERFACE(ObbActionListener, "IObbActionListener");
IMPLEMENT_META_INTERFACE(ObbActionListener, "IObbActionListener")

// ----------------------------------------------------------------------

@@ -49,7 +50,7 @@ status_t BnObbActionListener::onTransact(
            onObbResult(filename, nonce, state);
            reply->writeNoException();
            return NO_ERROR;
        } break;
        }
        default:
            return BBinder::onTransact(code, data, reply, flags);
    }
@@ -57,4 +58,4 @@ status_t BnObbActionListener::onTransact(

// ----------------------------------------------------------------------

};
}