From b4961f640019a0614638a159c289f7799eae7535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Mollier?= Date: Wed, 3 Jul 2024 22:41:32 +0200 Subject: [PATCH] ONE2LA.c: fix build failure with gcc 14. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since gcc 14, incompatible pointer type casting is now an error. In the case of daligner, the build results in the following errors: ONE2LA.c:135:13: error: assignment to ‘int64 *’ {aka ‘long long int *’} from incompatible pointer type ‘I64 *’ {aka ‘long int *’} [-Wincompatible-pointer-types] 135 | list = oneIntList(file1); | ^ ONE2LA.c:202:20: error: assignment to ‘int64 *’ {aka ‘long long int *’} from incompatible pointer type ‘I64 *’ {aka ‘long int *’} [-Wincompatible-pointer-types] 202 | list = oneIntList(file1); | ^ ONE2LA.c:210:20: error: assignment to ‘int64 *’ {aka ‘long long int *’} from incompatible pointer type ‘I64 *’ {aka ‘long int *’} [-Wincompatible-pointer-types] 210 | list = oneIntList(file1); | ^ ONE2LA.c:220:20: error: assignment to ‘int64 *’ {aka ‘long long int *’} from incompatible pointer type ‘I64 *’ {aka ‘long int *’} [-Wincompatible-pointer-types] 220 | list = oneIntList(file1); | ^ ONE2LA.c:227:20: error: assignment to ‘int64 *’ {aka ‘long long int *’} from incompatible pointer type ‘I64 *’ {aka ‘long int *’} [-Wincompatible-pointer-types] 227 | list = oneIntList(file1); | ^ Typing the list the same way as the return type of the oneIntList function is one possible way of resolving the issue. This has initially been reported on [Debian bug #1074900] by Matthias Klose. [Debian bug #1074900]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074900 Signed-off-by: Étienne Mollier --- ONE2LA.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ONE2LA.c b/ONE2LA.c index 4581433..4773755 100644 --- a/ONE2LA.c +++ b/ONE2LA.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) OneFile *file1; OneSchema *schema; - int64 *list; + I64 *list; char *string, *command; int t, i, j, k;