Opened 6 years ago

Closed 6 years ago

#1981 closed defect (fixed)

[RASTER] variables set but not used (warnings)

Reported by: strk Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.2
Component: raster Version: trunk
Keywords: history Cc:

Description

There are many cases of variables assigned to but never read back:

rt_pg.c: In function ‘RASTER_setPixelValuesArray’:
rt_pg.c:2544:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_pixelOfValue’:
rt_pg.c:3330:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:3329:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:3328:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_addBand’:
rt_pg.c:4025:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:4024:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:4023:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_addBandRasterArray’:
rt_pg.c:4247:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:4246:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:4245:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_band’:
rt_pg.c:5706:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:5705:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:5704:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_histogram’:
rt_pg.c:6290:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:6289:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:6288:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_histogramCoverage’:
rt_pg.c:6591:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:6590:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:6589:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_quantile’:
rt_pg.c:7106:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7105:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7104:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_quantileCoverage’:
rt_pg.c:7383:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7382:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7381:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_valueCount’:
rt_pg.c:7799:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7798:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:7797:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_valueCountCoverage’:
rt_pg.c:8038:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8037:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8036:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_reclass’:
rt_pg.c:8439:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8438:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8437:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_asGDALRaster’:
rt_pg.c:8982:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8981:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:8980:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_asRaster’:
rt_pg.c:9298:7: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:9297:7: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:9296:6: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]
rt_pg.c: In function ‘RASTER_bandmetadata’:
rt_pg.c:10245:8: warning: variable ‘lbs’ set but not used [-Wunused-but-set-variable]
rt_pg.c:10244:8: warning: variable ‘dims’ set but not used [-Wunused-but-set-variable]
rt_pg.c:10243:7: warning: variable ‘ndims’ set but not used [-Wunused-but-set-variable]

Worth fixing, to reduce the noise

Change History (4)

comment:1 Changed 6 years ago by strk

Forgot to mention, this is with:

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

comment:2 Changed 6 years ago by Bborie Park

Owner: changed from pracine to Bborie Park
Status: newassigned

comment:3 Changed 6 years ago by Bborie Park

Fixed in r10239 for -trunk.

comment:4 Changed 6 years ago by Bborie Park

Keywords: history added
Resolution: fixed
Status: assignedclosed

Fixed in r10240 for 2.0.

Note: See TracTickets for help on using tickets.