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 compiler warnings from extensions #1315

Merged
merged 3 commits into from
Dec 3, 2023

Conversation

QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Dec 3, 2023

The fixes 3 sets of warnings:

  • An unused __hash__ function, caused by a duplicated definition on the Cython side.
  • Various const char* -> char* warnings.
  • A maybe-uninitialized variable warning.

See commit message for details.

One uses the `wkt` property, and one uses `to_wkt`, but the former calls
the latter, so these implementations are pretty much the same.
- The callers of `gdal_open_vector` all pass in `const char*`, and so do
  all uses of the argument in this function.
- `GDALGetMetadataItem` returns `const char *`, so fix the corresponding
  variable type.
- `CPLCheckForFile` takes a `char*`, because it might modify its input,
  so we need to convert bytes to `char*` instead of `const char*`.
Copy link
Member

@sgillies sgillies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Thanks @QuLogic .

@sgillies sgillies merged commit 95b9eca into Toblerity:master Dec 3, 2023
8 checks passed
@sgillies
Copy link
Member

sgillies commented Dec 3, 2023

@sgillies note to port to maint-1.9.

@sgillies sgillies added the bug label Dec 3, 2023
@sgillies sgillies modified the milestones: 2.0, 1.9.6 Dec 3, 2023
@QuLogic QuLogic deleted the fix-cython-warnings branch December 4, 2023 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants