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

Commit 136c08a7 authored by Ashok Bhat's avatar Ashok Bhat
Browse files

Cast CallMethod's size_t parameters to jint



This will avoid problems caused by automatic type
promotion of parameters when passed to a variadic function.

Change-Id: I9340cf4bc3afcb84ebb2843d2aaa1e832b0df7f4
Signed-off-by: default avatarAshok Bhat <ashok.bhat@arm.com>
parent 557a93e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ class JavaDataSourceBridge : public DataSource {
        jbyteArray byteArrayObj = env->NewByteArray(size);
        env->DeleteLocalRef(env->GetObjectClass(mDataSource));
        env->DeleteLocalRef(env->GetObjectClass(byteArrayObj));
        ssize_t numread = env->CallIntMethod(mDataSource, mReadMethod, offset, byteArrayObj, size);
        ssize_t numread = env->CallIntMethod(mDataSource, mReadMethod, offset, byteArrayObj, (jint)size);
        env->GetByteArrayRegion(byteArrayObj, 0, size, (jbyte*) buffer);
        env->DeleteLocalRef(byteArrayObj);
        if (env->ExceptionCheck()) {
@@ -627,7 +627,7 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo(
    env->CallVoidMethod(
            cryptoInfoObj,
            gFields.cryptoInfoSetID,
            numSubSamples,
            (jint)numSubSamples,
            numBytesOfPlainDataObj,
            numBytesOfEncryptedDataObj,
            keyObj,