[libgxps] lib: Fix uninitialised variables
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] lib: Fix uninitialised variables
- Date: Thu, 22 Dec 2016 14:53:34 +0000 (UTC)
commit 86d1e6622fde800e504f25a1773723d6544d0dca
Author: Philip Withnall <withnall endlessm com>
Date: Tue Dec 20 19:29:44 2016 +0000
lib: Fix uninitialised variables
These could have been used later in the code if the relevant keys were
not present in the XPS file to set their values.
Coverity IDs: 1391239, 1391240
https://bugzilla.gnome.org/show_bug.cgi?id=776323
libgxps/gxps-brush.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgxps/gxps-brush.c b/libgxps/gxps-brush.c
index 3e088df..5dd621f 100644
--- a/libgxps/gxps-brush.c
+++ b/libgxps/gxps-brush.c
@@ -607,7 +607,7 @@ brush_start_element (GMarkupParseContext *context,
} else if (strcmp (element_name, "ImageBrush") == 0) {
GXPSBrushImage *image;
gchar *image_source = NULL;
- cairo_rectangle_t viewport, viewbox;
+ cairo_rectangle_t viewport = { 0, }, viewbox = { 0, };
cairo_matrix_t matrix;
cairo_extend_t extend = CAIRO_EXTEND_NONE;
gint i;
@@ -866,7 +866,7 @@ brush_start_element (GMarkupParseContext *context,
} else if (strcmp (element_name, "VisualBrush") == 0) {
GXPSBrushVisual *visual;
GXPSRenderContext *sub_ctx;
- cairo_rectangle_t viewport, viewbox;
+ cairo_rectangle_t viewport = { 0, }, viewbox = { 0, };
cairo_matrix_t matrix;
cairo_extend_t extend = CAIRO_EXTEND_NONE;
double width, height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]