From: Søren Sandmann Pedersen <[email protected]>

The 'value' field in the 'named_int_t' struct is used for both
pixman_repeat_t and pixman_kernel_t values, so the type should be int,
not pixman_kernel_t.

Fixes some warnings like this

scale.c:124:33: warning: implicit conversion from enumeration
      type 'pixman_repeat_t' to different enumeration type
      'pixman_kernel_t' [-Wconversion]
    { "None",                   PIXMAN_REPEAT_NONE },
    ~                           ^~~~~~~~~~~~~~~~~~

when compiled with clang.
---
 demos/scale.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/demos/scale.c b/demos/scale.c
index 869ada1..d00307e 100644
--- a/demos/scale.c
+++ b/demos/scale.c
@@ -103,8 +103,8 @@ compute_extents (pixman_f_transform_t *trans, double *sx, 
double *sy)
 
 typedef struct
 {
-    char               name [20];
-    pixman_kernel_t    value;
+    char       name [20];
+    int                value;
 } named_int_t;
 
 static const named_int_t filters[] =
@@ -127,7 +127,7 @@ static const named_int_t repeats[] =
     { "Pad",                    PIXMAN_REPEAT_PAD },
 };
 
-static pixman_kernel_t
+static int
 get_value (app_t *app, const named_int_t table[], const char *box_name)
 {
     GtkComboBox *box = GTK_COMBO_BOX (get_widget (app, box_name));
-- 
1.7.11.7

_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to