libreport/libreport-c89-2.patch

47 lines
2.4 KiB
Diff

problem_item_get_size expects unsigned long * argument in problem_data.at test
Otherwise, the test fails to build on i686 with GCC 14.
Submitted upstream: <https://github.com/abrt/libreport/pull/802>
diff --git a/tests/problem_data.at b/tests/problem_data.at
index 4d8bf0075c0a8b91..db67a76732d48663 100644
--- a/tests/problem_data.at
+++ b/tests/problem_data.at
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
struct problem_item *itm = problem_data_add_ext(data, "1", "foo", CD_FLAG_TXT | CD_FLAG_ISNOTEDITABLE, PROBLEM_ITEM_UNINITIALIZED_SIZE);
const size_t old_size = strlen(itm->content);
{
- size_t current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
+ unsigned long current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
assert(problem_item_get_size(itm, &current_size) == 0);
assert(current_size != PROBLEM_ITEM_UNINITIALIZED_SIZE);
assert(current_size == old_size);
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
{
g_free(itm->content);
itm->content = NULL;
- size_t current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
+ unsigned long current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
assert(problem_item_get_size(itm, &current_size) == 0);
assert(current_size != PROBLEM_ITEM_UNINITIALIZED_SIZE);
assert(current_size == old_size);
@@ -120,7 +120,7 @@ int main(int argc, char **argv)
struct problem_item *itm = problem_data_add_ext(data, "2", flnm, CD_FLAG_BIN, PROBLEM_ITEM_UNINITIALIZED_SIZE);
{
- size_t current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
+ unsigned long current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
assert(problem_item_get_size(itm, &current_size) == 0);
assert(current_size != PROBLEM_ITEM_UNINITIALIZED_SIZE);
assert(current_size == old_size);
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
close(flds);
unlink(flnm);
assert(stat(flnm, &buf) != 0);
- size_t current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
+ unsigned long current_size = PROBLEM_ITEM_UNINITIALIZED_SIZE;
assert(problem_item_get_size(itm, &current_size) == 0);
assert(current_size != PROBLEM_ITEM_UNINITIALIZED_SIZE);
assert(current_size == old_size);