Skip to content

ONE2LA.c: fix build failure with gcc 14.#97

Open
emollier wants to merge 1 commit intothegenemyers:masterfrom
emollier:gcc-14
Open

ONE2LA.c: fix build failure with gcc 14.#97
emollier wants to merge 1 commit intothegenemyers:masterfrom
emollier:gcc-14

Conversation

@emollier
Copy link

@emollier emollier commented Jul 3, 2024

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.

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 <emollier@debian.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant