thegenemyers / DALIGNER

Find all significant local alignments between reads
Other
138 stars 61 forks source link

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

Open emollier opened 2 months ago

emollier commented 2 months ago

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.