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

Remove warning by changing sprintf to snprintf in geos_ts_c.cpp #789

Merged
merged 1 commit into from Jan 6, 2023

Conversation

Maxxen
Copy link
Contributor

@Maxxen Maxxen commented Jan 5, 2023

On Apple clang version 14.0.0 (clang-1400.0.29.202) compiling geos_ts_c.cpp with -Werror,-Wdeprecated-declarations fails with:

'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.

This is the only use of sprintf I could find and since the buffer is already constant sized it makes sense to use snprintf instead to remove the warning.

@dbaston dbaston merged commit 0dae497 into libgeos:main Jan 6, 2023
@dbaston
Copy link
Member

dbaston commented Jan 6, 2023

Thanks!

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