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 C99 errors uncovered by -Wint-conversion and -Werror,-Wincompatib… #28

Merged
merged 1 commit into from Apr 4, 2024

Conversation

NHOrus
Copy link
Contributor

@NHOrus NHOrus commented Apr 4, 2024

…le-pointer-types

Fixes downstream bug https://bugs.gentoo.org/886460

@rouault
Copy link
Collaborator

rouault commented Apr 4, 2024

This fix doesn't seem to be correct to me. os_case() prototype is char *os_case( char *filename ), and coverage is already a char*, so there is no need to take its address

@NHOrus
Copy link
Contributor Author

NHOrus commented Apr 4, 2024

It's weird, but both Clang and GCC were giving errors:

../vpfprop.c:1474:27: error: incompatible integer to pointer conversion passing 'char' to parameter of type 'char *'; take the address with & [-Wint-conversion]
   strcat(covpath,os_case(coverage));
                          ^~~~~~~~
                          &

yeah, thank you.

It's bad fix, due to

char *library_path, coverage;

hitting line without pointer declared.

…er-types

Fixes downstream bug https://bugs.gentoo.org/886460
Part of the bug is caused by one branch of ifdef case having wrong function
signature.
Signed-off-by: NHOrus
@NHOrus
Copy link
Contributor Author

NHOrus commented Apr 4, 2024

New commit should have good fix.
Sorry.

@rouault rouault merged commit e2f9eec into libogdi:master Apr 4, 2024
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.

None yet

2 participants