[dia] [warningectomy] passing argument from incompatible pointer type
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] passing argument from incompatible pointer type
- Date: Sat, 4 May 2013 19:00:45 +0000 (UTC)
commit 9c481f649414190bf8d6741cbca1777e9766756b
Author: Hans Breuer <hans breuer org>
Date: Sat May 4 18:52:03 2013 +0200
[warningectomy] passing argument from incompatible pointer type
passing argument 3 of ‘g_test_add_data_func’ from incompatible
pointer type
tests/test-objects.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/tests/test-objects.c b/tests/test-objects.c
index dd25b8d..9ad00f0 100644
--- a/tests/test-objects.c
+++ b/tests/test-objects.c
@@ -42,8 +42,9 @@ const real EPSILON = 1e-6;
int num_objects = 0;
static void
-_test_creation (const DiaObjectType *type)
+_test_creation (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
int i;
Handle *h1 = NULL, *h2 = NULL;
Point point = {0, 0};
@@ -116,8 +117,9 @@ _test_creation (const DiaObjectType *type)
}
static void
-_test_copy (const DiaObjectType *type)
+_test_copy (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {0, 0};
DiaObject *oc, *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -178,8 +180,9 @@ _object_change_free(ObjectChange *change)
}
static void
-_test_movement (const DiaObjectType *type)
+_test_movement (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {5, 5};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -243,8 +246,9 @@ _test_movement (const DiaObjectType *type)
}
static void
-_test_change (const DiaObjectType *type)
+_test_change (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {0, 0};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -274,8 +278,9 @@ _test_change (const DiaObjectType *type)
g_free (o);
}
static void
-_test_move_handle (const DiaObjectType *type)
+_test_move_handle (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {0, 0};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -356,8 +361,9 @@ _test_move_handle (const DiaObjectType *type)
}
}
static void
-_test_connectionpoint_consistency (const DiaObjectType *type)
+_test_connectionpoint_consistency (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point pos = {0, 0};
Point center;
@@ -435,8 +441,9 @@ _test_connectionpoint_consistency (const DiaObjectType *type)
g_free (o);
}
static void
-_test_object_menu (const DiaObjectType *type)
+_test_object_menu (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {0, 0};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -492,8 +499,9 @@ _test_object_menu (const DiaObjectType *type)
}
static void
-_test_draw (const DiaObjectType *type)
+_test_draw (gconstpointer user_data)
{
+ const DiaObjectType *type = (const DiaObjectType *)user_data;
Handle *h1 = NULL, *h2 = NULL;
Point from = {0, 0};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -613,4 +621,4 @@ int _matherr( struct _exception *except )
g_warning ("%s %s(%f, %f)", type, except->name, except->arg1, except->arg2);
return 0;
}
-#endif
\ No newline at end of file
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]