diff options
author | Simon Bünzli <zeniko@gmail.com> | 2014-01-02 22:13:52 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-06 13:13:36 +0000 |
commit | fc0432b9121d528d9b775cd9ed103732c6440973 (patch) | |
tree | 535f81099ad080269b043cc37300effa1b3c5a06 /source/pdf/pdf-xref-aux.c | |
parent | 9b92bac1ec135862132b1c49b977b53891b73d88 (diff) | |
download | mupdf-fc0432b9121d528d9b775cd9ed103732c6440973.tar.xz |
fix MSVC warnings C4054 and C4152
These warnings are caused by casting function pointers to void*
instead of proper function types.
Diffstat (limited to 'source/pdf/pdf-xref-aux.c')
-rw-r--r-- | source/pdf/pdf-xref-aux.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source/pdf/pdf-xref-aux.c b/source/pdf/pdf-xref-aux.c index 48634374..968a8f9f 100644 --- a/source/pdf/pdf-xref-aux.c +++ b/source/pdf/pdf-xref-aux.c @@ -8,22 +8,12 @@ resulting executables. */ -static void pdf_run_page_contents_shim(fz_document *doc, fz_page *page, fz_device *dev, const fz_matrix *transform, fz_cookie *cookie) -{ - pdf_run_page_contents((pdf_document*)doc, (pdf_page*)page, dev, transform, cookie); -} - -static void pdf_run_annot_shim(fz_document *doc, fz_page *page, fz_annot *annot, fz_device *dev, const fz_matrix *transform, fz_cookie *cookie) -{ - pdf_run_annot((pdf_document*)doc, (pdf_page*)page, (pdf_annot *)annot, dev, transform, cookie); -} - pdf_document * pdf_open_document_with_stream(fz_context *ctx, fz_stream *file) { pdf_document *doc = pdf_open_document_no_run_with_stream(ctx, file); - doc->super.run_page_contents = pdf_run_page_contents_shim; - doc->super.run_annot = pdf_run_annot_shim; + doc->super.run_page_contents = (fz_document_run_page_contents_fn *)pdf_run_page_contents; + doc->super.run_annot = (fz_document_run_annot_fn *)pdf_run_annot; doc->update_appearance = pdf_update_appearance; return doc; } @@ -32,8 +22,8 @@ pdf_document * pdf_open_document(fz_context *ctx, const char *filename) { pdf_document *doc = pdf_open_document_no_run(ctx, filename); - doc->super.run_page_contents = pdf_run_page_contents_shim; - doc->super.run_annot = pdf_run_annot_shim; + doc->super.run_page_contents = (fz_document_run_page_contents_fn *)pdf_run_page_contents; + doc->super.run_annot = (fz_document_run_annot_fn *)pdf_run_annot; doc->update_appearance = pdf_update_appearance; return doc; } |