summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/viewer/jni/Core.mk2
-rw-r--r--platform/android/viewer/jni/mupdf.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/platform/android/viewer/jni/Core.mk b/platform/android/viewer/jni/Core.mk
index 4f9a3136..ca35e2a7 100644
--- a/platform/android/viewer/jni/Core.mk
+++ b/platform/android/viewer/jni/Core.mk
@@ -11,7 +11,7 @@ include $(CLEAR_VARS)
MY_ROOT := ../../..
-LOCAL_CFLAGS += -Wall -Wno-maybe-uninitialized
+LOCAL_CFLAGS += -Wall -Wno-uninitialized
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DARCH_ARM -DARCH_THUMB -DARCH_ARM_CAN_LOAD_UNALIGNED
diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c
index aa14a8f6..895f6912 100644
--- a/platform/android/viewer/jni/mupdf.c
+++ b/platform/android/viewer/jni/mupdf.c
@@ -368,7 +368,7 @@ JNI_FN(MuPDFCore_openFile)(JNIEnv * env, jobject thiz, jstring jfilename)
typedef struct buffer_state_s
{
globals *globals;
- char buffer[4096];
+ jbyte buffer[4096];
}
buffer_state;
@@ -391,7 +391,7 @@ static int bufferStreamNext(fz_context *ctx, fz_stream *stream, size_t max)
(*env)->GetByteArrayRegion(env, array, stream->pos, len, bs->buffer);
(*env)->DeleteLocalRef(env, array);
- stream->rp = bs->buffer;
+ stream->rp = (unsigned char *)bs->buffer;
stream->wp = stream->rp + len;
stream->pos += len;
if (len == 0)
@@ -1530,7 +1530,7 @@ JNI_FN(MuPDFCore_textAsHtml)(JNIEnv * env, jobject thiz)
bArray = (*env)->NewByteArray(env, buf->len);
if (bArray == NULL)
fz_throw(ctx, FZ_ERROR_GENERIC, "Failed to make byteArray");
- (*env)->SetByteArrayRegion(env, bArray, 0, buf->len, buf->data);
+ (*env)->SetByteArrayRegion(env, bArray, 0, buf->len, (const jbyte *)buf->data);
}
fz_always(ctx)
@@ -2386,7 +2386,7 @@ JNI_FN(MuPDFCore_getFocusedWidgetSignatureState)(JNIEnv * env, jobject thiz)
if (focus == NULL)
return Signature_NoSupport;
- if (!pdf_signatures_supported())
+ if (!pdf_signatures_supported(ctx))
return Signature_NoSupport;
return pdf_dict_get(ctx, ((pdf_annot *)focus)->obj, PDF_NAME_V) ? Signature_Signed : Signature_Unsigned;