diff options
author | Simon Bünzli <zeniko@gmail.com> | 2014-01-02 21:27:15 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-06 13:13:35 +0000 |
commit | 9b92bac1ec135862132b1c49b977b53891b73d88 (patch) | |
tree | dfd5faac92aa678cc5c8b23ae626d347b9d17494 /source/pdf/pdf-colorspace.c | |
parent | f6fe26922653b45519d406bd07840719cef1d979 (diff) | |
download | mupdf-9b92bac1ec135862132b1c49b977b53891b73d88.tar.xz |
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.
Diffstat (limited to 'source/pdf/pdf-colorspace.c')
-rw-r--r-- | source/pdf/pdf-colorspace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/pdf/pdf-colorspace.c b/source/pdf/pdf-colorspace.c index 611a187b..5fd569c3 100644 --- a/source/pdf/pdf-colorspace.c +++ b/source/pdf/pdf-colorspace.c @@ -42,7 +42,6 @@ load_icc_based(pdf_document *doc, pdf_obj *dict) } fz_throw(ctx, FZ_ERROR_GENERIC, "syntaxerror: ICCBased must have 1, 3 or 4 components"); - return NULL; /* Stupid MSVC */ } /* Lab */ @@ -350,7 +349,6 @@ pdf_load_colorspace_imp(pdf_document *doc, pdf_obj *obj) } fz_throw(doc->ctx, FZ_ERROR_GENERIC, "syntaxerror: could not parse color space (%d %d R)", pdf_to_num(obj), pdf_to_gen(obj)); - return NULL; /* Stupid MSVC */ } fz_colorspace * @@ -359,7 +357,7 @@ pdf_load_colorspace(pdf_document *doc, pdf_obj *obj) fz_context *ctx = doc->ctx; fz_colorspace *cs; - if ((cs = pdf_find_item(ctx, fz_free_colorspace_imp, obj))) + if ((cs = pdf_find_item(ctx, fz_free_colorspace_imp, obj)) != NULL) { return cs; } |