diff options
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/buffer.c | 2 | ||||
-rw-r--r-- | source/fitz/colorspace.c | 2 | ||||
-rw-r--r-- | source/fitz/document.c | 2 | ||||
-rw-r--r-- | source/fitz/draw-device.c | 2 | ||||
-rw-r--r-- | source/fitz/draw-glyph.c | 2 | ||||
-rw-r--r-- | source/fitz/filter-basic.c | 10 | ||||
-rw-r--r-- | source/fitz/font.c | 14 | ||||
-rw-r--r-- | source/fitz/image.c | 4 | ||||
-rw-r--r-- | source/fitz/load-jpx.c | 2 | ||||
-rw-r--r-- | source/fitz/load-png.c | 2 | ||||
-rw-r--r-- | source/fitz/load-pnm.c | 2 | ||||
-rw-r--r-- | source/fitz/load-tiff.c | 2 | ||||
-rw-r--r-- | source/fitz/output-png.c | 4 | ||||
-rw-r--r-- | source/fitz/output.c | 2 | ||||
-rw-r--r-- | source/fitz/stext-device.c | 4 | ||||
-rw-r--r-- | source/fitz/store.c | 2 | ||||
-rw-r--r-- | source/fitz/stream-open.c | 2 | ||||
-rw-r--r-- | source/fitz/util.c | 36 |
18 files changed, 48 insertions, 48 deletions
diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index 49c35726..a43ff296 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -31,7 +31,7 @@ fz_new_buffer(fz_context *ctx, size_t size) fz_buffer * fz_new_buffer_from_data(fz_context *ctx, unsigned char *data, size_t size) { - fz_buffer *b; + fz_buffer *b = NULL; fz_try(ctx) { diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 99aee398..29ad18d3 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -3151,7 +3151,7 @@ int fz_colorspace_is_indexed(fz_context *ctx, const fz_colorspace *cs) fz_colorspace * fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsigned char *lookup) { - fz_colorspace *cs; + fz_colorspace *cs = NULL; struct indexed *idx; idx = fz_malloc_struct(ctx, struct indexed); diff --git a/source/fitz/document.c b/source/fitz/document.c index c03012f2..0e511c05 100644 --- a/source/fitz/document.c +++ b/source/fitz/document.c @@ -144,7 +144,7 @@ fz_open_document(fz_context *ctx, const char *filename) { const fz_document_handler *handler; fz_stream *file; - fz_document *doc; + fz_document *doc = NULL; if (filename == NULL) fz_throw(ctx, FZ_ERROR_GENERIC, "no document to open"); diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index ce825eca..3a5ae1db 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -2600,7 +2600,7 @@ fz_new_draw_device_with_options(fz_context *ctx, const fz_draw_options *opts, co fz_rect bounds; fz_irect ibounds; fz_matrix transform; - fz_device *dev; + fz_device *dev = NULL; fz_aa_context aa = *ctx->aa; fz_set_rasterizer_graphics_aa_level(ctx, &aa, opts->graphics); diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c index 49ca6661..dacee540 100644 --- a/source/fitz/draw-glyph.c +++ b/source/fitz/draw-glyph.c @@ -413,7 +413,7 @@ unlock_and_return_val: fz_pixmap * fz_render_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, const fz_irect *scissor, int aa) { - fz_pixmap *val; + fz_pixmap *val = NULL; unsigned char qe, qf; fz_matrix subpix_ctm; float size = fz_subpixel_adjust(ctx, ctm, &subpix_ctm, &qe, &qf); diff --git a/source/fitz/filter-basic.c b/source/fitz/filter-basic.c index 8f3b18ac..5630c37b 100644 --- a/source/fitz/filter-basic.c +++ b/source/fitz/filter-basic.c @@ -58,7 +58,7 @@ close_null(fz_context *ctx, void *state_) fz_stream * fz_open_null(fz_context *ctx, fz_stream *chain, int len, fz_off_t offset) { - struct null_filter *state; + struct null_filter *state = NULL; if (len < 0) len = 0; @@ -278,7 +278,7 @@ close_ahxd(fz_context *ctx, void *state_) fz_stream * fz_open_ahxd(fz_context *ctx, fz_stream *chain) { - fz_ahxd *state; + fz_ahxd *state = NULL; fz_try(ctx) { @@ -422,7 +422,7 @@ close_a85d(fz_context *ctx, void *state_) fz_stream * fz_open_a85d(fz_context *ctx, fz_stream *chain) { - fz_a85d *state; + fz_a85d *state = NULL; fz_try(ctx) { @@ -533,7 +533,7 @@ close_rld(fz_context *ctx, void *state_) fz_stream * fz_open_rld(fz_context *ctx, fz_stream *chain) { - fz_rld *state; + fz_rld *state = NULL; fz_try(ctx) { @@ -596,7 +596,7 @@ close_arc4(fz_context *ctx, void *state_) fz_stream * fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen) { - fz_arc4c *state; + fz_arc4c *state = NULL; fz_try(ctx) { diff --git a/source/fitz/font.c b/source/fitz/font.c index 38c9abab..9a113460 100644 --- a/source/fitz/font.c +++ b/source/fitz/font.c @@ -590,7 +590,7 @@ fz_font * fz_new_font_from_memory(fz_context *ctx, const char *name, const unsigned char *data, int len, int index, int use_glyph_bbox) { fz_buffer *buffer = fz_new_buffer_from_shared_data(ctx, data, len); - fz_font *font; + fz_font *font = NULL; fz_try(ctx) font = fz_new_font_from_buffer(ctx, name, buffer, index, use_glyph_bbox); fz_always(ctx) @@ -604,7 +604,7 @@ fz_font * fz_new_font_from_file(fz_context *ctx, const char *name, const char *path, int index, int use_glyph_bbox) { fz_buffer *buffer = fz_read_file(ctx, path); - fz_font *font; + fz_font *font = NULL; fz_try(ctx) font = fz_new_font_from_buffer(ctx, name, buffer, index, use_glyph_bbox); fz_always(ctx) @@ -764,7 +764,7 @@ fz_pixmap * fz_render_ft_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, int aa) { FT_GlyphSlot slot = do_ft_render_glyph(ctx, font, gid, trm, aa); - fz_pixmap *pixmap; + fz_pixmap *pixmap = NULL; if (slot == NULL) { @@ -793,7 +793,7 @@ fz_glyph * fz_render_ft_glyph(fz_context *ctx, fz_font *font, int gid, const fz_matrix *trm, int aa) { FT_GlyphSlot slot = do_ft_render_glyph(ctx, font, gid, trm, aa); - fz_glyph *glyph; + fz_glyph *glyph = NULL; if (slot == NULL) { @@ -917,7 +917,7 @@ fz_render_ft_stroked_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, const { FT_Glyph glyph = do_render_ft_stroked_glyph(ctx, font, gid, trm, ctm, state, aa); FT_BitmapGlyph bitmap = (FT_BitmapGlyph)glyph; - fz_pixmap *pixmap; + fz_pixmap *pixmap = NULL; if (bitmap == NULL) { @@ -947,7 +947,7 @@ fz_render_ft_stroked_glyph(fz_context *ctx, fz_font *font, int gid, const fz_mat { FT_Glyph glyph = do_render_ft_stroked_glyph(ctx, font, gid, trm, ctm, state, aa); FT_BitmapGlyph bitmap = (FT_BitmapGlyph)glyph; - fz_glyph *result; + fz_glyph *result = NULL; if (bitmap == NULL) { @@ -1333,7 +1333,7 @@ fz_render_t3_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, const fz_matr fz_irect bbox; fz_device *dev = NULL; fz_pixmap *glyph; - fz_pixmap *result; + fz_pixmap *result = NULL; if (gid < 0 || gid > 255) return NULL; diff --git a/source/fitz/image.c b/source/fitz/image.c index 89798bf2..2716cf56 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -901,7 +901,7 @@ fz_new_image_from_buffer(fz_context *ctx, fz_buffer *buffer) fz_colorspace *cspace; size_t len = buffer->len; unsigned char *buf = buffer->data; - fz_image *image; + fz_image *image = NULL; int type; if (len < 8) @@ -981,7 +981,7 @@ fz_image * fz_new_image_from_file(fz_context *ctx, const char *path) { fz_buffer *buffer; - fz_image *image; + fz_image *image = NULL; buffer = fz_read_file(ctx, path); fz_try(ctx) diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c index dfe176cf..fb88498c 100644 --- a/source/fitz/load-jpx.c +++ b/source/fitz/load-jpx.c @@ -892,7 +892,7 @@ fz_pixmap * fz_load_jpx(fz_context *ctx, unsigned char *data, size_t size, fz_colorspace *defcs) { fz_jpxd state = { 0 }; - fz_pixmap *pix; + fz_pixmap *pix = NULL; fz_try(ctx) { diff --git a/source/fitz/load-png.c b/source/fitz/load-png.c index eabcf2d6..8f204015 100644 --- a/source/fitz/load-png.c +++ b/source/fitz/load-png.c @@ -559,7 +559,7 @@ png_mask_transparency(struct info *info, fz_pixmap *dst) fz_pixmap * fz_load_png(fz_context *ctx, unsigned char *p, size_t total) { - fz_pixmap *image; + fz_pixmap *image = NULL; fz_colorspace *colorspace; struct info png; int stride; diff --git a/source/fitz/load-pnm.c b/source/fitz/load-pnm.c index 9e38dcbd..36493823 100644 --- a/source/fitz/load-pnm.c +++ b/source/fitz/load-pnm.c @@ -628,7 +628,7 @@ pnm_read_image(fz_context *ctx, struct info *pnm, unsigned char *p, size_t total fz_pixmap * fz_load_pnm(fz_context *ctx, unsigned char *p, size_t total) { - fz_pixmap *img; + fz_pixmap *img = NULL; struct info pnm = { 0 }; fz_try(ctx) diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index 77539876..76df053a 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -292,7 +292,7 @@ tiff_decode_data(fz_context *ctx, struct tiff *tiff, unsigned char *rp, unsigned { fz_stream *encstm = NULL; fz_stream *stm = NULL; - unsigned i, size; + unsigned i, size = 0; unsigned char *reversed = NULL; fz_stream *jpegtables = NULL; int old_tiff; diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c index b86ea648..afda42f3 100644 --- a/source/fitz/output-png.c +++ b/source/fitz/output-png.c @@ -89,7 +89,7 @@ png_write_icc(fz_context *ctx, png_band_writer *writer, const fz_colorspace *cs) int size; fz_buffer *buffer = fz_icc_data_from_icc_colorspace(ctx, cs); unsigned char *data; - unsigned char *chunk, *pos, *cdata; + unsigned char *pos, *cdata, *chunk = NULL; uLong bound; uLongf csize; uLong long_size; @@ -356,7 +356,7 @@ fz_buffer * fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, const fz_color_params *color_params) { fz_pixmap *pix = fz_get_pixmap_from_image(ctx, image, NULL, NULL, NULL, NULL); - fz_buffer *buf; + fz_buffer *buf = NULL; fz_try(ctx) buf = png_from_pixmap(ctx, pix, color_params, 1); diff --git a/source/fitz/output.c b/source/fitz/output.c index 75872ab2..a0f7fdee 100644 --- a/source/fitz/output.c +++ b/source/fitz/output.c @@ -148,7 +148,7 @@ file_close(fz_context *ctx, void *opaque) fz_output * fz_new_output(fz_context *ctx, void *state, fz_output_write_fn *write, fz_output_close_fn *close) { - fz_output *out; + fz_output *out = NULL; fz_try(ctx) { diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c index ba609228..6d7df972 100644 --- a/source/fitz/stext-device.c +++ b/source/fitz/stext-device.c @@ -38,7 +38,7 @@ fz_stext_page * fz_new_stext_page(fz_context *ctx, const fz_rect *mediabox) { fz_pool *pool = fz_new_pool(ctx); - fz_stext_page *page; + fz_stext_page *page = NULL; fz_try(ctx) { page = fz_pool_alloc(ctx, pool, sizeof(*page)); @@ -588,7 +588,7 @@ fz_new_image_from_shade(fz_context *ctx, fz_shade *shade, fz_matrix *in_out_ctm, { fz_matrix ctm = *in_out_ctm; fz_pixmap *pix; - fz_image *img; + fz_image *img = NULL; fz_rect bounds; fz_irect bbox; diff --git a/source/fitz/store.c b/source/fitz/store.c index bf98c1aa..bb9426ba 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -447,7 +447,7 @@ fz_store_item(fz_context *ctx, void *key, void *val_, size_t itemsize, const fz_ * to check whether we have one there already. */ if (use_hash) { - fz_item *existing; + fz_item *existing = NULL; fz_try(ctx) { diff --git a/source/fitz/stream-open.c b/source/fitz/stream-open.c index 3fe58712..83990d52 100644 --- a/source/fitz/stream-open.c +++ b/source/fitz/stream-open.c @@ -16,7 +16,7 @@ fz_file_exists(fz_context *ctx, const char *path) fz_stream * fz_new_stream(fz_context *ctx, void *state, fz_stream_next_fn *next, fz_stream_close_fn *close) { - fz_stream *stm; + fz_stream *stm = NULL; fz_try(ctx) { diff --git a/source/fitz/util.c b/source/fitz/util.c index 5d75aaad..f7567edc 100644 --- a/source/fitz/util.c +++ b/source/fitz/util.c @@ -7,7 +7,7 @@ fz_new_display_list_from_page(fz_context *ctx, fz_page *page) { fz_display_list *list; fz_rect bounds; - fz_device *dev; + fz_device *dev = NULL; list = fz_new_display_list(ctx, fz_bound_page(ctx, page, &bounds)); @@ -34,7 +34,7 @@ fz_display_list * fz_new_display_list_from_page_number(fz_context *ctx, fz_document *doc, int number) { fz_page *page; - fz_display_list *list; + fz_display_list *list = NULL; page = fz_load_page(ctx, doc, number); fz_try(ctx) @@ -51,7 +51,7 @@ fz_new_display_list_from_page_contents(fz_context *ctx, fz_page *page) { fz_display_list *list; fz_rect bounds; - fz_device *dev; + fz_device *dev = NULL; list = fz_new_display_list(ctx, fz_bound_page(ctx, page, &bounds)); @@ -79,7 +79,7 @@ fz_new_display_list_from_annot(fz_context *ctx, fz_annot *annot) { fz_display_list *list; fz_rect bounds; - fz_device *dev; + fz_device *dev = NULL; list = fz_new_display_list(ctx, fz_bound_annot(ctx, annot, &bounds)); @@ -108,7 +108,7 @@ fz_new_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, const fz fz_rect rect; fz_irect irect; fz_pixmap *pix; - fz_device *dev; + fz_device *dev = NULL; fz_bound_display_list(ctx, list, &rect); fz_transform_rect(&rect, ctm); @@ -145,7 +145,7 @@ fz_new_pixmap_from_page_contents(fz_context *ctx, fz_page *page, const fz_matrix fz_rect rect; fz_irect irect; fz_pixmap *pix; - fz_device *dev; + fz_device *dev = NULL; fz_bound_page(ctx, page, &rect); fz_transform_rect(&rect, ctm); @@ -182,7 +182,7 @@ fz_new_pixmap_from_annot(fz_context *ctx, fz_annot *annot, const fz_matrix *ctm, fz_rect rect; fz_irect irect; fz_pixmap *pix; - fz_device *dev; + fz_device *dev = NULL; fz_bound_annot(ctx, annot, &rect); fz_transform_rect(&rect, ctm); @@ -219,7 +219,7 @@ fz_new_pixmap_from_page(fz_context *ctx, fz_page *page, const fz_matrix *ctm, fz fz_rect rect; fz_irect irect; fz_pixmap *pix; - fz_device *dev; + fz_device *dev = NULL; fz_bound_page(ctx, page, &rect); fz_transform_rect(&rect, ctm); @@ -254,7 +254,7 @@ fz_pixmap * fz_new_pixmap_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_matrix *ctm, fz_colorspace *cs, int alpha) { fz_page *page; - fz_pixmap *pix; + fz_pixmap *pix = NULL; page = fz_load_page(ctx, doc, number); fz_try(ctx) @@ -270,7 +270,7 @@ fz_stext_page * fz_new_stext_page_from_display_list(fz_context *ctx, fz_display_list *list, const fz_stext_options *options) { fz_stext_page *text; - fz_device *dev; + fz_device *dev = NULL; fz_rect mediabox; if (list == NULL) @@ -300,7 +300,7 @@ fz_stext_page * fz_new_stext_page_from_page(fz_context *ctx, fz_page *page, const fz_stext_options *options) { fz_stext_page *text; - fz_device *dev; + fz_device *dev = NULL; fz_rect mediabox; if (page == NULL) @@ -330,7 +330,7 @@ fz_stext_page * fz_new_stext_page_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_stext_options *options) { fz_page *page; - fz_stext_page *text; + fz_stext_page *text = NULL; page = fz_load_page(ctx, doc, number); fz_try(ctx) @@ -346,7 +346,7 @@ int fz_search_display_list(fz_context *ctx, fz_display_list *list, const char *needle, fz_rect *hit_bbox, int hit_max) { fz_stext_page *text; - int count; + int count = 0; text = fz_new_stext_page_from_display_list(ctx, list, NULL); fz_try(ctx) @@ -362,7 +362,7 @@ int fz_search_page(fz_context *ctx, fz_page *page, const char *needle, fz_rect *hit_bbox, int hit_max) { fz_stext_page *text; - int count; + int count = 0; text = fz_new_stext_page_from_page(ctx, page, NULL); fz_try(ctx) @@ -378,7 +378,7 @@ int fz_search_page_number(fz_context *ctx, fz_document *doc, int number, const char *needle, fz_rect *hit_bbox, int hit_max) { fz_page *page; - int count; + int count = 0; page = fz_load_page(ctx, doc, number); fz_try(ctx) @@ -462,7 +462,7 @@ fz_buffer * fz_new_buffer_from_display_list(fz_context *ctx, fz_display_list *list, const fz_rect *sel, int crlf, const fz_stext_options *options) { fz_stext_page *text; - fz_buffer *buf; + fz_buffer *buf = NULL; text = fz_new_stext_page_from_display_list(ctx, list, options); fz_try(ctx) @@ -478,7 +478,7 @@ fz_buffer * fz_new_buffer_from_page(fz_context *ctx, fz_page *page, const fz_rect *sel, int crlf, const fz_stext_options *options) { fz_stext_page *text; - fz_buffer *buf; + fz_buffer *buf = NULL; text = fz_new_stext_page_from_page(ctx, page, options); fz_try(ctx) @@ -494,7 +494,7 @@ fz_buffer * fz_new_buffer_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_rect *sel, int crlf, const fz_stext_options *options) { fz_page *page; - fz_buffer *buf; + fz_buffer *buf = NULL; page = fz_load_page(ctx, doc, number); fz_try(ctx) |