summaryrefslogtreecommitdiff
path: root/examples/cairotwisted.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-17 14:57:41 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-19 12:01:15 +0100
commitc5a6c44e9eaf0d6e2f9d2cbf8c549af479685a08 (patch)
tree7c06ee0fdc04d4c96ce9a95b77d682ae7e54b3d3 /examples/cairotwisted.c
parent8f8347587c423feda02c34b27cab919476ddbde5 (diff)
downloadpango-c5a6c44e9eaf0d6e2f9d2cbf8c549af479685a08.tar.gz
examples: Initialize variables
Avoid a compiler warning for potentially uninitialized variables.
Diffstat (limited to 'examples/cairotwisted.c')
-rw-r--r--examples/cairotwisted.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/cairotwisted.c b/examples/cairotwisted.c
index 83645dd1..d2d1cd30 100644
--- a/examples/cairotwisted.c
+++ b/examples/cairotwisted.c
@@ -167,7 +167,7 @@ curve_length (double x0, double y0,
cairo_surface_t *surface;
cairo_t *cr;
cairo_path_t *path;
- cairo_path_data_t *data, current_point;
+ cairo_path_data_t *data, current_point = {0,};
int i;
double length;
@@ -218,7 +218,7 @@ static parametrization_t *
parametrize_path (cairo_path_t *path)
{
int i;
- cairo_path_data_t *data, last_move_to, current_point;
+ cairo_path_data_t *data, last_move_to = {0,}, current_point = {0,};
parametrization_t *parametrization;
parametrization = g_malloc (path->num_data * sizeof (parametrization[0]));
@@ -325,7 +325,7 @@ point_on_path (parametrized_path_t *param,
{
int i;
double ratio, the_y = *y, the_x = *x, dx, dy;
- cairo_path_data_t *data, last_move_to, current_point;
+ cairo_path_data_t *data, last_move_to = {0,}, current_point = {0,};
cairo_path_t *path = param->path;
parametrization_t *parametrization = param->parametrization;