summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/fitz/colorspace.c2
-rw-r--r--source/fitz/function.c2
-rw-r--r--source/fitz/glyph.c2
-rw-r--r--source/fitz/list-device.c2
-rw-r--r--source/fitz/pixmap.c2
-rw-r--r--source/pdf/pdf-cmap.c2
-rw-r--r--source/pdf/pdf-font.c2
-rw-r--r--source/pdf/pdf-function.c2
-rw-r--r--source/pdf/pdf-image.c8
-rw-r--r--source/pdf/pdf-pattern.c2
-rw-r--r--source/pdf/pdf-xobject.c2
11 files changed, 11 insertions, 17 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c
index 5549496e..d24aad5e 100644
--- a/source/fitz/colorspace.c
+++ b/source/fitz/colorspace.c
@@ -30,7 +30,7 @@ fz_new_colorspace(fz_context *ctx, char *name, int n)
fz_colorspace *
fz_keep_colorspace(fz_context *ctx, fz_colorspace *cs)
{
- return (fz_colorspace *)fz_keep_storable(ctx, &cs->storable);
+ return fz_keep_storable(ctx, &cs->storable);
}
void
diff --git a/source/fitz/function.c b/source/fitz/function.c
index 75e47a94..138552ac 100644
--- a/source/fitz/function.c
+++ b/source/fitz/function.c
@@ -33,7 +33,7 @@ fz_eval_function(fz_context *ctx, fz_function *func, const float *in, int inlen,
fz_function *
fz_keep_function(fz_context *ctx, fz_function *func)
{
- return (fz_function *)fz_keep_storable(ctx, &func->storable);
+ return fz_keep_storable(ctx, &func->storable);
}
void
diff --git a/source/fitz/glyph.c b/source/fitz/glyph.c
index 8e514751..180b7421 100644
--- a/source/fitz/glyph.c
+++ b/source/fitz/glyph.c
@@ -5,7 +5,7 @@
fz_glyph *
fz_keep_glyph(fz_context *ctx, fz_glyph *glyph)
{
- return (fz_glyph *)fz_keep_storable(ctx, &glyph->storable);
+ return fz_keep_storable(ctx, &glyph->storable);
}
void
diff --git a/source/fitz/list-device.c b/source/fitz/list-device.c
index 099656d0..c003c2a5 100644
--- a/source/fitz/list-device.c
+++ b/source/fitz/list-device.c
@@ -1413,7 +1413,7 @@ fz_new_display_list(fz_context *ctx)
fz_display_list *
fz_keep_display_list(fz_context *ctx, fz_display_list *list)
{
- return (fz_display_list *)fz_keep_storable(ctx, &list->storable);
+ return fz_keep_storable(ctx, &list->storable);
}
void
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 38c96f0f..6c6e6e53 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -3,7 +3,7 @@
fz_pixmap *
fz_keep_pixmap(fz_context *ctx, fz_pixmap *pix)
{
- return (fz_pixmap *)fz_keep_storable(ctx, &pix->storable);
+ return fz_keep_storable(ctx, &pix->storable);
}
void
diff --git a/source/pdf/pdf-cmap.c b/source/pdf/pdf-cmap.c
index 16167439..14652c8a 100644
--- a/source/pdf/pdf-cmap.c
+++ b/source/pdf/pdf-cmap.c
@@ -28,7 +28,7 @@ pdf_new_cmap(fz_context *ctx)
pdf_cmap *
pdf_keep_cmap(fz_context *ctx, pdf_cmap *cmap)
{
- return (pdf_cmap *)fz_keep_storable(ctx, &cmap->storable);
+ return fz_keep_storable(ctx, &cmap->storable);
}
/* Could be a macro for speed */
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index 2d8cf0bb..4fcf8f62 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -354,7 +354,7 @@ pdf_load_embedded_font(fz_context *ctx, pdf_document *doc, pdf_font_desc *fontde
pdf_font_desc *
pdf_keep_font(fz_context *ctx, pdf_font_desc *fontdesc)
{
- return (pdf_font_desc *)fz_keep_storable(ctx, &fontdesc->storable);
+ return fz_keep_storable(ctx, &fontdesc->storable);
}
void
diff --git a/source/pdf/pdf-function.c b/source/pdf/pdf-function.c
index f8e72e87..2804f952 100644
--- a/source/pdf/pdf-function.c
+++ b/source/pdf/pdf-function.c
@@ -1613,9 +1613,7 @@ pdf_load_function(fz_context *ctx, pdf_document *doc, pdf_obj *dict, int in, int
fz_throw(ctx, FZ_ERROR_GENERIC, "Recursion in function definition");
if ((func = pdf_find_item(ctx, pdf_drop_function_imp, dict)) != NULL)
- {
return (fz_function *)func;
- }
func = fz_malloc_struct(ctx, pdf_function);
FZ_INIT_STORABLE(&func->base, 1, pdf_drop_function_imp);
diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c
index f04b3c04..b48a0ba5 100644
--- a/source/pdf/pdf-image.c
+++ b/source/pdf/pdf-image.c
@@ -283,13 +283,9 @@ pdf_load_image(fz_context *ctx, pdf_document *doc, pdf_obj *dict)
fz_image *image;
if ((image = pdf_find_item(ctx, fz_drop_image_imp, dict)) != NULL)
- {
- return (fz_image *)image;
- }
+ return image;
image = pdf_load_image_imp(ctx, doc, NULL, dict, NULL, 0);
-
pdf_store_item(ctx, dict, image, fz_image_size(ctx, image));
-
- return (fz_image *)image;
+ return image;
}
diff --git a/source/pdf/pdf-pattern.c b/source/pdf/pdf-pattern.c
index 0dc42d58..c23ef283 100644
--- a/source/pdf/pdf-pattern.c
+++ b/source/pdf/pdf-pattern.c
@@ -3,7 +3,7 @@
pdf_pattern *
pdf_keep_pattern(fz_context *ctx, pdf_pattern *pat)
{
- return (pdf_pattern *)fz_keep_storable(ctx, &pat->storable);
+ return fz_keep_storable(ctx, &pat->storable);
}
void
diff --git a/source/pdf/pdf-xobject.c b/source/pdf/pdf-xobject.c
index 19d633f0..fa765a5d 100644
--- a/source/pdf/pdf-xobject.c
+++ b/source/pdf/pdf-xobject.c
@@ -3,7 +3,7 @@
pdf_xobject *
pdf_keep_xobject(fz_context *ctx, pdf_xobject *xobj)
{
- return (pdf_xobject *)fz_keep_storable(ctx, &xobj->storable);
+ return fz_keep_storable(ctx, &xobj->storable);
}
void