summaryrefslogtreecommitdiff
path: root/src/cairo-line.c
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>2016-06-30 17:45:42 +0200
committerUli Schlachter <psychon@znc.in>2016-07-02 13:27:11 +0200
commitae403448af410984852aeff76278dc96e7141b9e (patch)
tree955236aa74892477212ea58b9c1cd04e5e1b373a /src/cairo-line.c
parent1272db90f85cf031e5d2ffb73d1af1259c9d4fb9 (diff)
downloadcairo-ae403448af410984852aeff76278dc96e7141b9e.tar.gz
core: fix compiler warnings
The code correct, but the compiler can't check that and thinks there're uninitialized variables. Perhaps we could rewrite it in a better way, so the compiler can do better (even arch specific) optimizations. Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net> Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-line.c')
-rw-r--r--src/cairo-line.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-line.c b/src/cairo-line.c
index cb13927bd..dc00a9cb1 100644
--- a/src/cairo-line.c
+++ b/src/cairo-line.c
@@ -110,9 +110,9 @@ lines_compare_x_for_y_general (const cairo_line_t *a,
* should prevent that before the tessellation algorithm
* begins.
*/
- int32_t dx;
- int32_t adx, ady;
- int32_t bdx, bdy;
+ int32_t dx = 0;
+ int32_t adx = 0, ady = 0;
+ int32_t bdx = 0, bdy = 0;
enum {
HAVE_NONE = 0x0,
HAVE_DX = 0x1,
@@ -218,7 +218,7 @@ lines_compare_x_for_y (const cairo_line_t *a,
HAVE_BX = 0x2,
HAVE_BOTH = HAVE_AX | HAVE_BX
} have_ax_bx = HAVE_BOTH;
- int32_t ax, bx;
+ int32_t ax = 0, bx = 0;
if (y == a->p1.y)
ax = a->p1.x;