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: Ashok Bhat <ashok.bhat@arm.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user