summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-09-17 13:18:22 +0200
committerBenjamin Otte <otte@gnome.org>2009-10-20 00:40:40 +0200
commit5c3ef4e9798f3395c55fe7b57df32f77c0de2c71 (patch)
tree6974909f9f85f64b00978e5f05bfee6473a161af
parentad484078854572cf640d7ffbb66f1e99328e79b8 (diff)
Fix compile warnings
-rw-r--r--pixman/pixman-fast-path.c2
-rw-r--r--pixman/pixman-mmx.c2
-rw-r--r--test/alpha-test.c10
-rw-r--r--test/blitters-test.c3
-rw-r--r--test/clip-test.c2
-rw-r--r--test/composite-test.c5
-rw-r--r--test/gradient-test.c8
-rw-r--r--test/utils.h7
8 files changed, 29 insertions, 10 deletions
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 25f6016..c053229 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -723,6 +723,7 @@ fast_composite_over_8888_8888 (pixman_implementation_t *imp,
}
}
+#if 0
static void
fast_composite_over_8888_0888 (pixman_implementation_t *imp,
pixman_op_t op,
@@ -773,6 +774,7 @@ fast_composite_over_8888_0888 (pixman_implementation_t *imp,
}
}
}
+#endif
static void
fast_composite_over_8888_0565 (pixman_implementation_t *imp,
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 3595742..aaddff5 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -3153,6 +3153,7 @@ mmx_composite_copy_area (pixman_implementation_t *imp,
src_x, src_y, dest_x, dest_y, width, height);
}
+#if 0
static void
mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp,
pixman_op_t op,
@@ -3219,6 +3220,7 @@ mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp,
_mm_empty ();
}
+#endif
static const pixman_fast_path_t mmx_fast_paths[] =
{
diff --git a/test/alpha-test.c b/test/alpha-test.c
index e2b97c7..fd6b2ec 100644
--- a/test/alpha-test.c
+++ b/test/alpha-test.c
@@ -14,7 +14,6 @@ main (int argc, char **argv)
uint32_t *src = malloc (WIDTH * HEIGHT * 4);
pixman_image_t *grad_img;
pixman_image_t *alpha_img;
- pixman_image_t *solid_img;
pixman_image_t *dest_img;
pixman_image_t *src_img;
int i;
@@ -26,24 +25,25 @@ main (int argc, char **argv)
pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH),
pixman_int_to_fixed (0) };
+#if 0
pixman_transform_t trans = {
{ { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
}
};
-
- pixman_transform_t id = {
+#else
+ pixman_transform_t trans = {
{ { pixman_fixed_1, 0, 0 },
{ 0, pixman_fixed_1, 0 },
{ 0, 0, pixman_fixed_1 } }
};
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
pixman_fixed_t r_inner;
pixman_fixed_t r_outer;
- pixman_color_t red = { 0xffff, 0x0000, 0x0000, 0xffff };
for (i = 0; i < WIDTH * HEIGHT; ++i)
alpha[i] = 0x4f00004f; /* pale blue */
@@ -91,7 +91,7 @@ main (int argc, char **argv)
grad_img = pixman_image_create_linear_gradient (&p1, &p2,
stops, 2);
- pixman_image_set_transform (grad_img, &id);
+ pixman_image_set_transform (grad_img, &trans);
pixman_image_set_repeat (grad_img, PIXMAN_REPEAT_PAD);
pixman_image_composite (PIXMAN_OP_OVER, grad_img, NULL, alpha_img,
diff --git a/test/blitters-test.c b/test/blitters-test.c
index 569e946..b8b6eba 100644
--- a/test/blitters-test.c
+++ b/test/blitters-test.c
@@ -56,7 +56,8 @@ aligned_malloc (size_t align, size_t size)
void *result;
#ifdef HAVE_POSIX_MEMALIGN
- posix_memalign (&result, align, size);
+ if (posix_memalign (&result, align, size) != 0)
+ result = NULL;
#else
result = malloc (size);
#endif
diff --git a/test/clip-test.c b/test/clip-test.c
index 9000137..cbab447 100644
--- a/test/clip-test.c
+++ b/test/clip-test.c
@@ -31,9 +31,11 @@ main (int argc, char **argv)
{ pixman_int_to_fixed (0), { 0xffff, 0x0000, 0x0000, 0xffff } },
{ pixman_int_to_fixed (1), { 0xffff, 0xffff, 0x0000, 0xffff } }
};
+#if 0
pixman_point_fixed_t p1 = { 0, 0 };
pixman_point_fixed_t p2 = { pixman_int_to_fixed (WIDTH),
pixman_int_to_fixed (HEIGHT) };
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
pixman_fixed_t r_inner;
diff --git a/test/composite-test.c b/test/composite-test.c
index 49e0220..2f14502 100644
--- a/test/composite-test.c
+++ b/test/composite-test.c
@@ -77,6 +77,9 @@ writer (void *src, uint32_t value, int size)
case 4:
*(uint32_t *)src = value;
break;
+
+ default:
+ break;
}
}
@@ -113,7 +116,7 @@ main (int argc, char **argv)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (window, 800, 600);
+ gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_main_quit),
diff --git a/test/gradient-test.c b/test/gradient-test.c
index 2593ee3..c95c714 100644
--- a/test/gradient-test.c
+++ b/test/gradient-test.c
@@ -21,18 +21,20 @@ main (int argc, char **argv)
pixman_point_fixed_t p1 = { pixman_double_to_fixed (0), 0 };
pixman_point_fixed_t p2 = { pixman_double_to_fixed (WIDTH / 8.),
pixman_int_to_fixed (0) };
+#if 0
pixman_transform_t trans = {
{ { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (3), pixman_double_to_fixed (0), },
{ pixman_double_to_fixed (0), pixman_double_to_fixed (0.000), pixman_double_to_fixed (1.0) }
}
};
-
- pixman_transform_t id = {
+#else
+ pixman_transform_t trans = {
{ { pixman_fixed_1, 0, 0 },
{ 0, pixman_fixed_1, 0 },
{ 0, 0, pixman_fixed_1 } }
};
+#endif
pixman_point_fixed_t c_inner;
pixman_point_fixed_t c_outer;
@@ -67,7 +69,7 @@ main (int argc, char **argv)
src_img = pixman_image_create_linear_gradient (&p1, &p2,
stops, 2);
- pixman_image_set_transform (src_img, &id);
+ pixman_image_set_transform (src_img, &trans);
pixman_image_set_repeat (src_img, PIXMAN_REPEAT_PAD);
pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
diff --git a/test/utils.h b/test/utils.h
index bc110d8..2cb13bc 100644
--- a/test/utils.h
+++ b/test/utils.h
@@ -1,6 +1,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
+#include <gtk/gtk.h>
#include "pixman.h"
void show_image (pixman_image_t *image);
+
+GdkPixbuf *pixbuf_from_argb32 (uint32_t *bits,
+ gboolean has_alpha,
+ int width,
+ int height,
+ int stride);