checks: Fix -Wunused-but-set-variable compiler warnings, part 1#2648
Merged
nilason merged 5 commits intoOSGeo:mainfrom Nov 17, 2022
Merged
checks: Fix -Wunused-but-set-variable compiler warnings, part 1#2648nilason merged 5 commits intoOSGeo:mainfrom
nilason merged 5 commits intoOSGeo:mainfrom
Conversation
21 tasks
Warnings on comparison of narrow type with wide type in loop condition.
This reverts commit de618e6.
Contributor
Author
|
CodeQL warnings are addressed with #2649. |
marisn
approved these changes
Nov 16, 2022
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
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.
Compiling with -Wall using Clang 14 throws some 150
-Wunused-but-set-variablewarnings. Fixing them are in the majority of cases just spring-cleaning. Here is the first batch of two, addressing them. Now affecting following parts:db/drivers
dbf
ogr
postgres
sqlite
display
d.grid
d.histogram
d.path
d.vect.thematic
imagery
i.albedo
i.aster.toar
i.eb.netrad
i.evapo.time
i.ortho.photo
i.segment
mics
m.nviz.image
m.nviz.script
raster
r.in.ascii
r.in.mat
r.kappa
r.kappa
r.li/r.li.daemon
r.out.png
r.out.pov
r.random.cells
r.random.surface
r.regression.multi
r.report
r.ros
r.series
r.sim/r.sim.water
r.sim/simlib
r.solute.transport
r.spread
r.univar
r.viewshed
r.watershed/ram
r.watershed/seg
raster3d
r3.cross.rast
r3.out.v5d
vector
v.hull
v.in.dxf
v.info
v.kernel
v.label.sa
v.out.vtk
v.overlay
v.to.rast
v.vol.rst
lib
vector/dglib
Reported in #2156. Accompanied by #2650.