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, part 6 #1274

Closed
wants to merge 5 commits into from

Conversation

nilason
Copy link
Contributor

@nilason nilason commented Jan 26, 2021

Fixes compiler warnings:

  • -Wformat-extra-args
  • -Wformat-invalid-specifier
  • -Wparentheses
  • -Wparentheses-equality
  • -Wtautological-compare

Sixth part addressing #1247.

There are a couple of ambivalent cases and I'm not sure how to correctly address them. See comments.

Modules / code parts directly affected:

  • lib/dspf
  • lib/imagery/
  • lib/vector/Vlib/
  • display/d.vect.thematic
  • raster/r.compress
  • raster/r.fill.stats
  • raster/r.in.gridatb
  • raster3d/r3.info

lib/imagery/iscatt_core.c Outdated Show resolved Hide resolved
raster/r.fill.stats/main.c Outdated Show resolved Hide resolved
@nilason nilason mentioned this pull request Jan 26, 2021
27 tasks
nilason and others added 4 commits February 15, 2021 13:57
Fixes -Wformat-invalid-specifier compiler warnings.
Fixes -Wparentheses compiler warnings.
Fixes -Wparentheses-equality compiler warnings.
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
nilason added a commit to nilason/grass that referenced this pull request Feb 15, 2021
Fixes -Wformat-extra-args compiler warnings.
@nilason nilason marked this pull request as ready for review February 15, 2021 13:09
@nilason
Copy link
Contributor Author

nilason commented Feb 15, 2021

@metzm Added your suggestion and reworded commits.
Now remains to be decided what to do with commented out part of raster/r.fill.stats/main.c.

Fixes -Wformat-extra-args compiler warning.
@nilason
Copy link
Contributor Author

nilason commented Feb 21, 2021

I removed addressing the warning in raster/r.fill.stats/main.c :166 and put it in a new PR #1395 (draft so far).
This way we can at least move ahead with the other fixes, if it's good with you @metzm.

nilason added a commit to nilason/grass that referenced this pull request Feb 22, 2021
Fixes -Wparentheses compiler warnings.
nilason added a commit to nilason/grass that referenced this pull request Feb 22, 2021
Fixes -Wparentheses-equality compiler warnings.
nilason added a commit to nilason/grass that referenced this pull request Feb 22, 2021
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
nilason added a commit to nilason/grass that referenced this pull request Feb 22, 2021
Fixes -Wformat-extra-args compiler warning.
Copy link
Contributor

@metzm metzm left a comment

Choose a reason for hiding this comment

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

Looks good to me, please merge and let's move on.

nilason added a commit that referenced this pull request Feb 27, 2021
Fixes -Wparentheses compiler warnings.
nilason added a commit that referenced this pull request Feb 27, 2021
Fixes -Wparentheses-equality compiler warnings.
nilason added a commit that referenced this pull request Feb 27, 2021
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
nilason added a commit that referenced this pull request Feb 27, 2021
Fixes -Wformat-extra-args compiler warning.
@nilason
Copy link
Contributor Author

nilason commented Feb 27, 2021

Cherry picked and pushed manually.
@metzm Thanks!

@nilason nilason closed this Feb 27, 2021
@nilason nilason deleted the fix-compiler-warnings-6 branch February 27, 2021 12:14
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
Fixes -Wparentheses compiler warnings.
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
Fixes -Wparentheses-equality compiler warnings.
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
Fixes -Wformat-extra-args compiler warning.
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
Fixes -Wparentheses compiler warnings.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
Fixes -Wparentheses-equality compiler warnings.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
Fixes -Wformat-extra-args compiler warning.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Fixes -Wparentheses compiler warnings.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Fixes -Wparentheses-equality compiler warnings.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Fixes -Wformat-extra-args compiler warning.
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

3 participants