Fix compiler warnings, part 5 (rst/interpfl lib & v.surf.rst)#1271
Merged
nilason merged 1 commit intoOSGeo:masterfrom Aug 19, 2021
Merged
Fix compiler warnings, part 5 (rst/interpfl lib & v.surf.rst)#1271nilason merged 1 commit intoOSGeo:masterfrom
nilason merged 1 commit intoOSGeo:masterfrom
Conversation
20c12ef to
f0f8aff
Compare
Contributor
Author
|
Updated this PR to use the standard bool type (now included in gis.h). |
Output deviation argument to IL_init_params_2d() and in the interp_params struct, was defined as FILE*. In practice a char* of the file path was given to the function in 'v.surf.rst/main.c' and this pointer's only use was to check whether it was NULL or not. It was used as a flag. This changes the argument to be a bool. Addresses a -Wincompatible-pointer-types compiler warning.
f0f8aff to
4b00fbf
Compare
Contributor
Author
|
Any thoughts on this PR? Would be good to merge/address this for G8. |
metzm
approved these changes
Aug 19, 2021
Contributor
metzm
left a comment
There was a problem hiding this comment.
In this case breaking the API seems ok to me because it only affects the rst lib and only two modules.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Oct 26, 2022
Output deviation argument to IL_init_params_2d() and in the interp_params struct, was defined as FILE*. In practice a char* of the file path was given to the function in 'v.surf.rst/main.c' and this pointer's only use was to check whether it was NULL or not. It was used as a flag. This changes the argument to be a bool. Addresses a -Wincompatible-pointer-types compiler warning.
petrasovaa
added a commit
to petrasovaa/grass
that referenced
this pull request
Nov 10, 2022
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
Output deviation argument to IL_init_params_2d() and in the interp_params struct, was defined as FILE*. In practice a char* of the file path was given to the function in 'v.surf.rst/main.c' and this pointer's only use was to check whether it was NULL or not. It was used as a flag. This changes the argument to be a bool. Addresses a -Wincompatible-pointer-types compiler warning.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
marisn
pushed a commit
to marisn/grass
that referenced
this pull request
Jun 2, 2023
neteler
pushed a commit
to nilason/grass
that referenced
this pull request
Nov 7, 2023
neteler
pushed a commit
that referenced
this pull request
Jan 26, 2025
Output deviation argument to IL_init_params_2d() and in the interp_params struct, was defined as FILE*. In practice a char* of the file path was given to the function in 'v.surf.rst/main.c' and this pointer's only use was to check whether it was NULL or not. It was used as a flag. This changes the argument to be a bool. Addresses a -Wincompatible-pointer-types compiler warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Output deviation argument to
IL_init_params_2d()and in theinterp_paramsstruct (lib/rst/interp_float), was defined as FILE*. In practice a char* of the file path was given to the function in 'v.surf.rst/main.c' and this pointer's only use was to check whether it was NULL or not. It was used as a flag (and this is the reason it worked at all). This changes the argument to bean integer, representing a boolean valueabool.Addresses one -Wincompatible-pointer-types compiler warning.
This is a suggestion of how to address this warning (and wrongful code). I'm aware it breaks API.
I'm looking forward, as always, for input, comments...
Fifth part addressing #1247.