dia/dia-0.97.3-g_test_add_data_func_2.patch
Bjørn Lie 78fbdb4202 - Added patches dia-configure-c99.patch,
dia-0.97.3-get_data_size.patch, dia-0.97.3-const-ft_vector.patch,
  dia-0.97.3-g_test_add_data_func_1.patch and
  dia-0.97.3-g_test_add_data_func_2.patch to address C99 compliance
  issues (mainly use of incompatible pointer types) that are errors by
  default with GCC 14 [boo#1224536].  All of these patches were taken
  from the Fedora dia package.

Please (assuming the request is OK) forward to Factory soon-ish too so
that we can switch the default compiler.  Thanks.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/dia?expand=0&rev=56
2024-07-09 18:25:56 +00:00

49 lines
1.5 KiB
Diff

Backport from https://gitlab.gnome.org/GNOME/dia/-/commit/9c481f649414190bf8d6741cbca1777e9766756b
--- dia-0.97.3/tests/test-objects.c 2014-08-24 17:46:02.000000000 +0200
+++ dia-0.97.3/tests/test-objects.c.g_test_add_data_func_2 2024-03-03 01:01:53.832977690 +0100
@@ -39,8 +39,9 @@
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};
@@ -112,8 +113,9 @@
}
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);
@@ -172,8 +174,9 @@
}
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 = {0, 0};
DiaObject *o = type->ops->create (&from, type->default_user_data, &h1, &h2);
@@ -215,8 +218,9 @@
}
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);