]> granicus.if.org Git - postgis/commitdiff
Removed unnecessary/unused variables and assignments. Ticket is #1981
authorBborie Park <bkpark at ucdavis.edu>
Thu, 6 Sep 2012 17:34:04 +0000 (17:34 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Thu, 6 Sep 2012 17:34:04 +0000 (17:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10239 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rt_pg.c

index 837c08b341b59f21d0ebc88ceb42d26ff34b9afe..60ec9870fb7808b4d6c8a0930d3331a21b4d91da 100644 (file)
@@ -2541,7 +2541,6 @@ Datum RASTER_setPixelValuesArray(PG_FUNCTION_ARGS)
        char typalign;
        int ndims = 1;
        int *dims;
-       int *lbs;
        int num = 0;
 
        int ul[2] = {0};
@@ -2650,7 +2649,6 @@ Datum RASTER_setPixelValuesArray(PG_FUNCTION_ARGS)
 
        ndims = ARR_NDIM(array);
        dims = ARR_DIMS(array);
-       lbs = ARR_LBOUND(array);
        POSTGIS_RT_DEBUGF(4, "ndims = %d", ndims);
 
        if (ndims < 1 || ndims > 2) {
@@ -2763,7 +2761,6 @@ Datum RASTER_setPixelValuesArray(PG_FUNCTION_ARGS)
 
                ndims = ARR_NDIM(array);
                dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
                POSTGIS_RT_DEBUGF(4, "ndims = %d", ndims);
 
                if (ndims < 1 || ndims > 2) {
@@ -3325,9 +3322,6 @@ Datum RASTER_pixelOfValue(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                /* create a function context for cross-call persistence */
                funcctx = SRF_FIRSTCALL_INIT();
@@ -3387,10 +3381,6 @@ Datum RASTER_pixelOfValue(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -4020,9 +4010,6 @@ Datum RASTER_addBand(PG_FUNCTION_ARGS)
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
        int n = 0;
 
        HeapTupleHeader tup;
@@ -4050,10 +4037,6 @@ Datum RASTER_addBand(PG_FUNCTION_ARGS)
        etype = ARR_ELEMTYPE(array);
        get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
 
-       ndims = ARR_NDIM(array);
-       dims = ARR_DIMS(array);
-       lbs = ARR_LBOUND(array);
-
        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                &nulls, &n);
 
@@ -4242,9 +4225,6 @@ Datum RASTER_addBandRasterArray(PG_FUNCTION_ARGS)
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
        int n = 0;
 
        int rtn = 0;
@@ -4322,10 +4302,6 @@ Datum RASTER_addBandRasterArray(PG_FUNCTION_ARGS)
        etype = ARR_ELEMTYPE(array);
        get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
 
-       ndims = ARR_NDIM(array);
-       dims = ARR_DIMS(array);
-       lbs = ARR_LBOUND(array);
-
        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                &nulls, &n);
 
@@ -5701,9 +5677,6 @@ Datum RASTER_band(PG_FUNCTION_ARGS)
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
 
        uint32_t numBands;
        uint32_t *bandNums;
@@ -5749,10 +5722,6 @@ Datum RASTER_band(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -6285,9 +6254,6 @@ Datum RASTER_histogram(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                POSTGIS_RT_DEBUG(3, "RASTER_histogram: Starting");
 
@@ -6369,10 +6335,6 @@ Datum RASTER_histogram(PG_FUNCTION_ARGS)
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -6586,9 +6548,6 @@ Datum RASTER_histogramCoverage(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                POSTGIS_RT_DEBUG(3, "RASTER_histogramCoverage: first call of function");
 
@@ -6673,10 +6632,6 @@ Datum RASTER_histogramCoverage(PG_FUNCTION_ARGS)
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -7101,9 +7056,6 @@ Datum RASTER_quantile(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                /* create a function context for cross-call persistence */
                funcctx = SRF_FIRSTCALL_INIT();
@@ -7177,10 +7129,6 @@ Datum RASTER_quantile(PG_FUNCTION_ARGS)
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -7378,9 +7326,6 @@ Datum RASTER_quantileCoverage(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                POSTGIS_RT_DEBUG(3, "RASTER_quantileCoverage: first call of function");
 
@@ -7459,10 +7404,6 @@ Datum RASTER_quantileCoverage(PG_FUNCTION_ARGS)
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -7794,9 +7735,6 @@ Datum RASTER_valueCount(PG_FUNCTION_ARGS) {
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                /* create a function context for cross-call persistence */
                funcctx = SRF_FIRSTCALL_INIT();
@@ -7854,10 +7792,6 @@ Datum RASTER_valueCount(PG_FUNCTION_ARGS) {
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -8033,9 +7967,6 @@ Datum RASTER_valueCountCoverage(PG_FUNCTION_ARGS) {
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
 
                /* create a function context for cross-call persistence */
                funcctx = SRF_FIRSTCALL_INIT();
@@ -8098,10 +8029,6 @@ Datum RASTER_valueCountCoverage(PG_FUNCTION_ARGS) {
                                        break;
                        }
 
-                       ndims = ARR_NDIM(array);
-                       dims = ARR_DIMS(array);
-                       lbs = ARR_LBOUND(array);
-
                        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                                &nulls, &n);
 
@@ -8434,9 +8361,6 @@ Datum RASTER_reclass(PG_FUNCTION_ARGS) {
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
        int n = 0;
 
        int i = 0;
@@ -8494,10 +8418,6 @@ Datum RASTER_reclass(PG_FUNCTION_ARGS) {
        etype = ARR_ELEMTYPE(array);
        get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
 
-       ndims = ARR_NDIM(array);
-       dims = ARR_DIMS(array);
-       lbs = ARR_LBOUND(array);
-
        deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                &nulls, &n);
 
@@ -8977,9 +8897,6 @@ Datum RASTER_asGDALRaster(PG_FUNCTION_ARGS)
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
        int n = 0;
        int i = 0;
        int j = 0;
@@ -9034,10 +8951,6 @@ Datum RASTER_asGDALRaster(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -9293,9 +9206,6 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
        int16 typlen;
        bool typbyval;
        char typalign;
-       int ndims = 1;
-       int *dims;
-       int *lbs;
        int n = 0;
        int i = 0;
        int j = 0;
@@ -9399,10 +9309,6 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -9485,10 +9391,6 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -9553,10 +9455,6 @@ Datum RASTER_asRaster(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);
 
@@ -10240,9 +10138,6 @@ Datum RASTER_bandmetadata(PG_FUNCTION_ARGS)
                int16 typlen;
                bool typbyval;
                char typalign;
-               int ndims = 1;
-               int *dims;
-               int *lbs;
                int i = 0;
                int j = 0;
                int n = 0;
@@ -10304,10 +10199,6 @@ Datum RASTER_bandmetadata(PG_FUNCTION_ARGS)
                                break;
                }
 
-               ndims = ARR_NDIM(array);
-               dims = ARR_DIMS(array);
-               lbs = ARR_LBOUND(array);
-
                deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
                        &nulls, &n);