checks: Fix -Wunused-but-set-variable compiler warnings, part 1 #2648
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-variable
warnings. 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.