diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-11-07 12:22:21 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-11-08 20:06:10 +0100 |
commit | a5f105a2acb853f3bd7a71cb5c4c896dbcbb7480 (patch) | |
tree | 9418dea9d9ecfa069a5ed81d34ad837f00e22ad1 /platform/android/viewer | |
parent | be56635e063e84848389c4dd99990f78c35b6519 (diff) | |
download | mupdf-a5f105a2acb853f3bd7a71cb5c4c896dbcbb7480.tar.xz |
Fix android warnings.
Diffstat (limited to 'platform/android/viewer')
-rw-r--r-- | platform/android/viewer/jni/Core.mk | 2 | ||||
-rw-r--r-- | platform/android/viewer/jni/mupdf.c | 8 |
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; |