[gtk/wip/baedert/test-cflags: 2/6] testuite/gsk: Add common_cflags to build



commit 83982a28e7878c7023ed49be29146b71ab4fbfaf
Author: Timm Bäder <mail baedert org>
Date:   Fri Mar 6 18:11:46 2020 +0100

    testuite/gsk: Add common_cflags to build
    
    And fix all the warnings and errors.

 testsuite/gsk/meson.build | 2 +-
 testsuite/gsk/transform.c | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 2b53f219e5..8c4706f67e 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -197,7 +197,7 @@ foreach t : tests
   test_extra_ldflags = t.get(3, [])
 
   test_exe = executable(test_name, test_srcs,
-    c_args : test_cargs + test_extra_cargs,
+    c_args : test_cargs + test_extra_cargs + common_cflags,
     link_args : test_extra_ldflags,
     dependencies : libgtk_dep,
     install: get_option('install-tests'),
diff --git a/testsuite/gsk/transform.c b/testsuite/gsk/transform.c
index b90e4f4bc0..6439952c3e 100644
--- a/testsuite/gsk/transform.c
+++ b/testsuite/gsk/transform.c
@@ -190,16 +190,16 @@ check_conversions (GskTransform         *transform,
                                   &f[4 * 3 + 0], &f[4 * 3 + 1]);
       graphene_matrix_init_from_float (&test, f);
       graphene_assert_fuzzy_matrix_equal (&matrix, &test, EPSILON);
-      /* fallthrough */
 
+      G_GNUC_FALLTHROUGH;
     case GSK_TRANSFORM_CATEGORY_2D_AFFINE:
       gsk_transform_to_affine (transform,
                                &f[4 * 0 + 0], &f[4 * 1 + 1],
                                &f[4 * 3 + 0], &f[4 * 3 + 1]);
       graphene_matrix_init_from_float (&test, f);
       graphene_assert_fuzzy_matrix_equal (&matrix, &test, EPSILON);
-      /* fallthrough */
 
+      G_GNUC_FALLTHROUGH;
     case GSK_TRANSFORM_CATEGORY_2D:
       gsk_transform_to_2d (transform,
                            &f[4 * 0 + 0], &f[4 * 0 + 1],
@@ -208,6 +208,9 @@ check_conversions (GskTransform         *transform,
       graphene_matrix_init_from_float (&test, f);
       graphene_assert_fuzzy_matrix_equal (&matrix, &test, EPSILON);
       break;
+
+    default:
+      g_assert_not_reached ();
    }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]