diff options
-rw-r--r-- | cbz/mucbz.c | 2 | ||||
-rw-r--r-- | fitz/base_error.c | 2 | ||||
-rw-r--r-- | fitz/fitz.h | 5 | ||||
-rw-r--r-- | fitz/res_font.c | 2 | ||||
-rw-r--r-- | pdf/pdf_annot.c | 2 | ||||
-rw-r--r-- | pdf/pdf_nametree.c | 2 | ||||
-rw-r--r-- | xps/xps_zip.c | 2 |
7 files changed, 13 insertions, 4 deletions
diff --git a/cbz/mucbz.c b/cbz/mucbz.c index 7a6416e1..df6be18f 100644 --- a/cbz/mucbz.c +++ b/cbz/mucbz.c @@ -494,7 +494,7 @@ static int cbz_meta(fz_document *doc_, int key, void *ptr, int size) { cbz_document *doc = (cbz_document *)doc_; - doc = doc; + UNUSED(doc); switch(key) { diff --git a/fitz/base_error.c b/fitz/base_error.c index ce048a1e..995f59c6 100644 --- a/fitz/base_error.c +++ b/fitz/base_error.c @@ -4,7 +4,7 @@ void fz_var_imp(void *var) { - var = var; /* Do nothing */ + UNUSED(var); /* Do nothing */ } void fz_flush_warnings(fz_context *ctx) diff --git a/fitz/fitz.h b/fitz/fitz.h index dd9424a9..b4e7cee4 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -121,6 +121,11 @@ int gettimeofday(struct timeval *tv, struct timezone *tz); #endif /* + Shut the compiler up about unused variables +*/ +#define UNUSED(x) do { x = x; } while (0) + +/* Some standard math functions, done as static inlines for speed. People with compilers that do not adequately implement inlines may like to reimplement these using macros. diff --git a/fitz/res_font.c b/fitz/res_font.c index 50420d97..77cae676 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -568,7 +568,7 @@ fz_render_ft_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix tr state->linejoin == FZ_LINEJOIN_BEVEL ? FT_STROKER_LINEJOIN_BEVEL : FT_STROKER_LINEJOIN_MITER; #endif - FT_Stroker_Set(stroker, linewidth, state->start_cap, line_join, state->miterlimit * 65536); + FT_Stroker_Set(stroker, linewidth, (FT_Stroker_LineCap)state->start_cap, line_join, state->miterlimit * 65536); fterr = FT_Get_Glyph(face->glyph, &glyph); if (fterr) diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index d6b5096e..427ad964 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -198,6 +198,8 @@ pdf_parse_action(pdf_document *xref, pdf_obj *action) pdf_obj *obj, *dest; fz_context *ctx = xref->ctx; + UNUSED(ctx); + ld.kind = FZ_LINK_NONE; if (!action) diff --git a/pdf/pdf_nametree.c b/pdf/pdf_nametree.c index 7d8ac319..d163dc08 100644 --- a/pdf/pdf_nametree.c +++ b/pdf/pdf_nametree.c @@ -118,6 +118,8 @@ pdf_load_name_tree_imp(pdf_obj *dict, pdf_document *xref, pdf_obj *node) pdf_obj *names = pdf_dict_gets(node, "Names"); int i; + UNUSED(ctx); + if (kids && !pdf_dict_mark(node)) { int len = pdf_array_len(kids); diff --git a/xps/xps_zip.c b/xps/xps_zip.c index e7756f89..099bbf46 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -716,7 +716,7 @@ static int xps_meta(fz_document *doc_, int key, void *ptr, int size) { xps_document *doc = (xps_document *)doc_; - doc = doc; + UNUSED(doc); switch(key) { |