summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-06-10 22:30:17 +0000
committerMatthias Clasen <mclasen@redhat.com>2022-06-10 22:30:17 +0000
commit5156e4c7f837e757551f7e7c5710cd143df56ac0 (patch)
treec20e0bd36547117d57814272fd97967f3deab48b
parent6b14c28a00c8799b9cade31d5749a9b455c15484 (diff)
parentce74afe4eb6f15cf3e7e60a4a917c31efb59dc4c (diff)
downloadpango-5156e4c7f837e757551f7e7c5710cd143df56ac0.tar.gz
Merge branch 'example-cflags' into 'main'
Example cflags See merge request GNOME/pango!621
-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