summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/cairotwisted.c7
-rw-r--r--examples/meson.build1
2 files changed, 5 insertions, 3 deletions
diff --git a/examples/cairotwisted.c b/examples/cairotwisted.c
index 1572c89a..f769bb29 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 = {0,};
+ 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 = {0,}, current_point = {0,};
+ cairo_path_data_t *data, last_move_to = {{0,},}, current_point = {{0,},};
parametrization_t *parametrization;
parametrization = g_malloc (path->num_data * sizeof (parametrization[0]));
@@ -278,6 +278,7 @@ transform_path (cairo_path_t *path, transform_point_func_t f, void *closure)
case CAIRO_PATH_CURVE_TO:
f (closure, &data[3].point.x, &data[3].point.y);
f (closure, &data[2].point.x, &data[2].point.y);
+ G_GNUC_FALLTHROUGH;
case CAIRO_PATH_MOVE_TO:
case CAIRO_PATH_LINE_TO:
f (closure, &data[1].point.x, &data[1].point.y);
@@ -325,7 +326,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 = {0,}, current_point = {0,};
+ cairo_path_data_t *data, last_move_to = {{0,},}, current_point = {{0,},};
cairo_path_t *path = param->path;
parametrization_t *parametrization = param->parametrization;
diff --git a/examples/meson.build b/examples/meson.build
index 0ec3860e..deee70fd 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -24,6 +24,7 @@ endif
foreach e: examples
executable(e, '@0@.c'.format(e),
dependencies: examples_deps + pango_deps,
+ c_args: common_cflags,
include_directories: root_inc,
install: false)
endforeach