Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 <[email protected]>
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