diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-09-06 20:16:16 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-09-07 20:40:38 +0800 |
commit | a27d9903ec238af6e4c1c59de1e1dae817b4f028 (patch) | |
tree | edab5a190abb4ee105d74e19cf5dc479fadf109a /source/fitz/util.c | |
parent | b096bed7b44f187eaacd8d8ee5f53a67d4aedda2 (diff) | |
download | mupdf-a27d9903ec238af6e4c1c59de1e1dae817b4f028.tar.xz |
Initialize variables to appease clang scan-build.
Diffstat (limited to 'source/fitz/util.c')
-rw-r--r-- | source/fitz/util.c | 36 |
1 files changed, 18 insertions, 18 deletions
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) |