From 9b92bac1ec135862132b1c49b977b53891b73d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=BCnzli?= Date: Thu, 2 Jan 2014 21:27:15 +0100 Subject: fix various MSVC warnings Some warnings we'd like to enable for MuPDF and still be able to compile it with warnings as errors using MSVC (2008 to 2013): * C4115: 'timeval' : named type definition in parentheses * C4204: nonstandard extension used : non-constant aggregate initializer * C4295: 'hex' : array is too small to include a terminating null character * C4389: '==' : signed/unsigned mismatch * C4702: unreachable code * C4706: assignment within conditional expression Also, globally disable C4701 which is frequently caused by MSVC not being able to correctly figure out fz_try/fz_catch code flow. And don't define isnan for VS2013 and later where that's no longer needed. --- source/fitz/draw-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/fitz/draw-device.c') diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 355022f3..cf3daa51 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -564,7 +564,9 @@ fz_draw_fill_text(fz_device *devp, fz_text *text, const fz_matrix *ctm, } else { - fz_matrix mat = {pixmap->w, 0.0, 0.0, pixmap->h, x + pixmap->x, y + pixmap->y}; + fz_matrix mat; + mat.a = pixmap->w; mat.b = mat.c = 0; mat.d = pixmap->h; + mat.e = x + pixmap->x; mat.f = y + pixmap->y; fz_paint_image(state->dest, &state->scissor, state->shape, pixmap, &mat, alpha * 255, !(devp->hints & FZ_DONT_INTERPOLATE_IMAGES)); } fz_drop_glyph(dev->ctx, glyph); -- cgit v1.2.3