diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-09-13 15:47:58 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-09-13 16:02:32 +0100 |
commit | aefe6a511b3cb901034e5995fd882e334e40f2bb (patch) | |
tree | 74005b19d77e704480b2c7c43c3ed51c15b17dcf /platform/x11 | |
parent | a0a92b5cf0fa076c923e7a5aa911dfff28aea351 (diff) | |
download | mupdf-aefe6a511b3cb901034e5995fd882e334e40f2bb.tar.xz |
Fix various compile warnings spotted by the cluster.
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/pdfapp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index afd4196e..10a44573 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -428,7 +428,7 @@ static int pdfapp_save(pdfapp_t *app) if (gen_tmp_file(buf, PATH_MAX)) { - int written; + int written = 0; fz_try(app->ctx) { @@ -438,7 +438,6 @@ static int pdfapp_save(pdfapp_t *app) } fz_catch(app->ctx) { - written = 0; } if (written) @@ -797,6 +796,10 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai fz_transition *new_trans; app->new_image = app->image; app->image = NULL; + if (app->grayscale) + colorspace = fz_device_gray(app->ctx); + else + colorspace = app->colorspace; app->image = fz_new_pixmap_with_bbox(app->ctx, colorspace, &ibounds); app->duration = 0; new_trans = fz_page_presentation(app->doc, app->page, &app->duration); |