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

Fix various incompatible pointer types. #78

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

Conversation

emollier
Copy link

This patch fixes a bunch of type errors like the following, by casting the expected types, working around gcc warnings that have gone fatal in gcc 14:

src/index.c:1263:59: error: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type
+[-Wincompatible-pointer-types]
1263 |          sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
     |                                                           ^~~~~~~
     |                                                           |
     |                                                           char **
src/pairix.h:131:73: note: expected ‘const char **’ but argument is of type ‘char **’

Note the pointer returned by ti_iter_first cast to "int" in function ti_query_2d_tid, in src/index.c, feels like an incident waiting to happen, but the function is expected to return addresses or error codes, so it is left as-is due to lack of better idea for the moment.

This patch fixes a bunch of type errors like the following, by casting
the expected types, working around gcc warnings that have gone fatal
in gcc 14:

	src/index.c:1263:59: error: passing argument 2 of ‘ti_querys_2d_multi’ from incompatible pointer type
	+[-Wincompatible-pointer-types]
	1263 |          sequential_iter_t *siter = ti_querys_2d_multi(t, regions, n_sub_list);
	     |                                                           ^~~~~~~
	     |                                                           |
	     |                                                           char **
	src/pairix.h:131:73: note: expected ‘const char **’ but argument is of type ‘char **’

Note the pointer returned by ti_iter_first cast to "int" in function
ti_query_2d_tid, in src/index.c, feels like an incident waiting to
happen, but the function is expected to return addresses or error
codes, so it is left as-is due to lack of better idea for the moment.

Signed-off-by: Étienne Mollier <emollier@debian.org>
@nvictus
Copy link
Contributor

nvictus commented Dec 19, 2024

can confirm this solution works for me @clarabakker

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.

2 participants