From d79f72365de5b27b31953f614eb35f8a18b91247 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 13 Sep 2016 23:18:52 +0800 Subject: Fix clang compiler warnings. --- platform/java/mupdf_native.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'platform/java/mupdf_native.c') diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 39256043..1b21d3c0 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -4155,7 +4155,7 @@ FUN(Page_search)(JNIEnv *env, jobject self, jstring jneedle) { fz_context *ctx = get_context(env); fz_page *page = from_Page(env, self); - fz_rect hits[256] = { 0 }; + fz_rect hits[256]; const char *needle = NULL; int n = 0; @@ -4468,7 +4468,7 @@ FUN(DisplayList_search)(JNIEnv *env, jobject self, jstring jneedle) { fz_context *ctx = get_context(env); fz_display_list *list = from_DisplayList(env, self); - fz_rect hits[256] = { 0 }; + fz_rect hits[256]; const char *needle = NULL; int n = 0; @@ -4949,7 +4949,7 @@ FUN(StructuredText_search)(JNIEnv *env, jobject self, jstring jneedle) { fz_context *ctx = get_context(env); fz_stext_page *text = from_StructuredText(env, self); - fz_rect hits[256] = { 0 }; + fz_rect hits[256]; const char *needle = NULL; int n = 0; @@ -4978,7 +4978,7 @@ FUN(StructuredText_highlight)(JNIEnv *env, jobject self, jobject jrect) fz_context *ctx = get_context(env); fz_stext_page *text = from_StructuredText(env, self); fz_rect rect = from_Rect(env, jrect); - fz_rect hits[256] = { 0 }; + fz_rect hits[256]; int n = 0; if (!ctx) return NULL; @@ -5845,7 +5845,7 @@ FUN(PDFDocument_save)(JNIEnv *env, jobject self, jstring jfilename, jstring jopt pdf_document *pdf = from_PDFDocument(env, self); const char *filename = NULL; const char *options = NULL; - pdf_write_options pwo = { 0 }; + pdf_write_options pwo; int errors = 0; if (!ctx) return 0; @@ -6981,7 +6981,10 @@ FUN(PDFObject_size)(JNIEnv *env, jobject self) fz_try(ctx) len = pdf_array_len(ctx, arr); fz_catch(ctx) + { jni_rethrow(env, ctx); + return 0; + } return len; } -- cgit v1.2.3