Skip to content

Commit 6b21e4c

Browse files
author
jef
committedApr 30, 2011
fix gcc 4.6 warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15857 c8812cc2-4d05-0410-92ff-de0c093fc19c

28 files changed

+28
-113
lines changed
 

‎src/analysis/raster/qgsrastercalculator.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ int QgsRasterCalculator::processCalculation( QProgressDialog* p )
120120
{
121121
char* crsWKT = 0;
122122
OGRSpatialReferenceH ogrSRS = OSRNewSpatialReference( NULL );
123-
const QgsCoordinateReferenceSystem& outputCrs = rl->crs();
124-
int epsgCode = outputCrs.epsg();
125-
if ( epsgCode > 0 && OSRImportFromEPSG( ogrSRS, epsgCode ) == CE_None )
123+
if ( OSRSetFromUserInput( ogrSRS, rl->crs().authid().toUtf8().constData() ) == OGRERR_NONE )
126124
{
127125
OSRExportToWkt( ogrSRS, &crsWKT );
128126
GDALSetProjection( outputDataset, crsWKT );

‎src/app/ogr/qgsopenvectorlayerdialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,10 @@ void QgsOpenVectorLayerDialog::setConnectionTypeListPosition()
240240
QSettings settings;
241241

242242
QString toSelect = settings.value( "/ogr/connections/selectedtype" ).toString();
243-
bool set = false;
244243
for ( int i = 0; i < cmbDatabaseTypes->count(); ++i )
245244
if ( cmbDatabaseTypes->itemText( i ) == toSelect )
246245
{
247246
cmbDatabaseTypes->setCurrentIndex( i );
248-
set = true;
249247
break;
250248
}
251249
}

‎src/app/qgisapp.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,8 +3877,6 @@ void QgisApp::mergeSelectedFeatures()
38773877
}
38783878

38793879
//make a first geometry union and notify the user straight away if the union geometry type does not match the layer one
3880-
QGis::WkbType originalType = vl->wkbType();
3881-
QGis::WkbType newType = unionGeom->wkbType();
38823880
if ( providerChecksTypeStrictly && unionGeom->wkbType() != vl->wkbType() )
38833881
{
38843882
QMessageBox::critical( 0, tr( "Union operation canceled" ), tr( "The union operation would result in a geometry type that is not compatible with the current layer and therefore is canceled" ) );
@@ -3918,8 +3916,6 @@ void QgisApp::mergeSelectedFeatures()
39183916
return;
39193917
}
39203918

3921-
originalType = vl->wkbType();
3922-
newType = unionGeom->wkbType();
39233919
if ( providerChecksTypeStrictly && unionGeom->wkbType() != vl->wkbType() )
39243920
{
39253921
QMessageBox::critical( 0, "Union operation canceled", tr( "The union operation would result in a geometry type that is not compatible with the current layer and therefore is canceled" ) );

‎src/app/qgsattributetypedialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ void QgsAttributeTypeDialog::vCellChanged( int row, int column )
8686
void QgsAttributeTypeDialog::removeSelectedButtonPushed()
8787
{
8888
QList<QTableWidgetItem *> list = tableWidget->selectedItems();
89-
QList<QTableWidgetItem *>::iterator it = list.begin();
9089
QSet<int> rowsToRemove;
9190
int removed = 0;
9291
int i = 0;

‎src/app/qgsgraduatedsymboldialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ void QgsGraduatedSymbolDialog::adjustNumberOfClasses()
157157
show();
158158
return;
159159
}
160-
161-
std::map < QString, int >::iterator iter = mFieldMap.find( fieldstring );
162160
}
163161

164162
void QgsGraduatedSymbolDialog::apply()

‎src/app/qgslabelpropertydialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId )
5555
return;
5656
}
5757
const QgsAttributeMap& attributeValues = f.attributeMap();
58-
QgsAttributeMap::const_iterator attIt = attributeValues.constBegin();
5958

6059
//get layerproperties. Problem: only for pallabeling...
6160
QgsPalLabeling* lbl = dynamic_cast<QgsPalLabeling*>( mMapRenderer->labelingEngine() );

‎src/app/qgsrasterlayerproperties.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,8 +1886,6 @@ void QgsRasterLayerProperties::refreshHistogram()
18861886
// and max - scaled to image height. 1 line drawn per selected band
18871887
//
18881888
const int BINCOUNT = 255;
1889-
enum GRAPH_TYPE { BAR_CHART, LINE_CHART } myGraphType;
1890-
myGraphType = BAR_CHART;
18911889
bool myIgnoreOutOfRangeFlag = true;
18921890
bool myThoroughBandScanFlag = false;
18931891
int myBandCountInt = mRasterLayer->bandCount();

‎src/core/composer/qgscomposeritem.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& heigh
958958
//assume points 1 and 3 are on the rectangle boundaries. Calculate 2 and 4.
959959
double distM1 = sqrt(( x1 - midX ) * ( x1 - midX ) + ( y1 - midY ) * ( y1 - midY ) );
960960
QPointF p2 = pointOnLineWithDistance( QPointF( midX, midY ), QPointF( x2, y2 ), distM1 );
961-
QPointF p4 = pointOnLineWithDistance( QPointF( midX, midY ), QPointF( x4, y4 ), distM1 );
962961

963962
if ( p2.x() < width && p2.x() > 0 && p2.y() < height && p2.y() > 0 )
964963
{

‎src/core/composer/qgscomposerscalebar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ void QgsComposerScaleBar::applyDefaultSize()
138138
if ( mComposerMap )
139139
{
140140
//calculate mNumUnitsPerSegment
141-
QRectF composerItemRect = mComposerMap->rect();
142141
QgsRectangle composerMapRect = mComposerMap->extent();
143142

144143
double proposedScaleBarLength = composerMapRect.width() / 4;

‎src/core/gps/gmath.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,13 @@ double nmea_distance_ellipsoid(
163163
while (( delta_lambda > 1e-12 ) && ( remaining_steps > 0 ) )
164164
{ /* Iterate */
165165
/* Variables */
166-
double tmp1, tmp2, tan_sigma, sin_alpha, cos_alpha, C, lambda_prev;
166+
double tmp1, tmp2, sin_alpha, cos_alpha, C, lambda_prev;
167167

168168
/* Calculation */
169169
tmp1 = cos_U2 * sin_lambda;
170170
tmp2 = cos_U1 * sin_U2 - sin_U1 * cos_U2 * cos_lambda;
171171
sin_sigma = sqrt( tmp1 * tmp1 + tmp2 * tmp2 );
172172
cos_sigma = sin_U1 * sin_U2 + cos_U1 * cos_U2 * cos_lambda;
173-
tan_sigma = sin_sigma / cos_sigma;
174173
sin_alpha = cos_U1 * cos_U2 * sin_lambda / sin_sigma;
175174
cos_alpha = cos( asin( sin_alpha ) );
176175
sqr_cos_alpha = cos_alpha * cos_alpha;
@@ -261,7 +260,7 @@ int nmea_move_horz_ellipsoid(
261260
/* Variables */
262261
double f, a, b, sqr_a, sqr_b;
263262
double phi1, tan_U1, sin_U1, cos_U1, s, alpha1, sin_alpha1, cos_alpha1;
264-
double tan_sigma1, sigma1, sin_alpha, cos_alpha, sqr_cos_alpha, sqr_u, A, B;
263+
double sigma1, sin_alpha, sqr_cos_alpha, sqr_u, A, B;
265264
double sigma_initial, sigma, sigma_prev, sin_sigma, cos_sigma, cos_2_sigmam, sqr_cos_2_sigmam, delta_sigma;
266265
int remaining_steps;
267266
double tmp1, phi2, lambda, C, L;
@@ -293,11 +292,9 @@ int nmea_move_horz_ellipsoid(
293292
alpha1 = azimuth;
294293
sin_alpha1 = sin( alpha1 );
295294
cos_alpha1 = cos( alpha1 );
296-
tan_sigma1 = tan_U1 / cos_alpha1;
297295
sigma1 = atan2( tan_U1, cos_alpha1 );
298296
sin_alpha = cos_U1 * sin_alpha1;
299297
sqr_cos_alpha = 1 - sin_alpha * sin_alpha;
300-
cos_alpha = sqrt( sqr_cos_alpha );
301298
sqr_u = sqr_cos_alpha * ( sqr_a - sqr_b ) / sqr_b;
302299
A = 1 + sqr_u / 16384 * ( 4096 + sqr_u * ( -768 + sqr_u * ( 320 - 175 * sqr_u ) ) );
303300
B = sqr_u / 1024 * ( 256 + sqr_u * ( -128 + sqr_u * ( 74 - 47 * sqr_u ) ) );

‎src/core/pal/feature.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ namespace pal
10101010
if ( shapes_final->size() > 0 )
10111011
{
10121012
LinkedList<LabelPosition*> *positions = new LinkedList<LabelPosition*> ( ptrLPosCompare );
1013-
int it;
10141013

10151014
int id = 0; // ids for candidates
10161015
double dlx, dly; // delta from label center and bottom-left corner
@@ -1037,7 +1036,6 @@ namespace pal
10371036
j++;
10381037
}
10391038

1040-
it = 0;
10411039
dx = dy = min( yrm, xrm ) / 2;
10421040

10431041
int num_try = 0;

‎src/core/pal/pointset.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ namespace pal
611611
double cp;
612612
double best_cp;
613613
double distNearestPoint;
614-
int nearestPoint;
615614

616615
double area;
617616
double width;
@@ -689,14 +688,12 @@ namespace pal
689688
alpha_seg = (( i / 4 > 0 ? ( i / 4 ) - 1 : 3 ) ) * M_PI / 2 + alpha;
690689

691690
best_cp = DBL_MAX;
692-
nearestPoint = -1;
693691
for ( j = 0; j < nbPoints; j++ )
694692
{
695693
cp = cross_product( bb[i+2], bb[i+3], bb[i], bb[i+1], x[cHull[j]], y[cHull[j]] );
696694
if ( cp < best_cp )
697695
{
698696
best_cp = cp;
699-
nearestPoint = cHull[j];
700697
}
701698
}
702699

‎src/core/pal/problem.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,6 @@ namespace pal
21382138
double initial_cost;
21392139
double cur_cost = 0;
21402140
double best_cost = 0;
2141-
double bestChain;
21422141

21432142
int nbOverlap = 0;
21442143

@@ -2166,7 +2165,6 @@ namespace pal
21662165

21672166
int tenure = pal->tenure;
21682167

2169-
int itBest = -1;
21702168
//int deltaIt = 0;
21712169

21722170
Triple **candidates = new Triple*[probSize];
@@ -2208,10 +2206,7 @@ namespace pal
22082206

22092207
sort(( void** ) candidates, probSize, decreaseCost );
22102208

2211-
int validCandidateId = -1;
2212-
22132209
int candidateListSize;
2214-
int seedSh;
22152210
candidateListSize = int ( pal->candListSize * ( double ) probSize + 0.5 );
22162211

22172212
if ( candidateListSize > probSize )
@@ -2226,16 +2221,13 @@ namespace pal
22262221
while ( it < stop_it )
22272222
{
22282223
retainedChain = NULL;
2229-
bestChain = DBL_MAX;
2230-
validCandidateId = -1;
22312224

22322225
#ifdef _DEBUG_FULL_
22332226
std::cout << std::endl << std::endl << candidateListSize << std::endl;
22342227
#endif
22352228
for ( itC = 0; itC < candidateListSize; itC++ )
22362229
{
22372230
seed = candidates[itC]->feat_id;
2238-
seedSh = seed - borderSize;
22392231

22402232
#ifdef _DEBUG_FULL_
22412233
std::cout << "new candidates:" << std::endl;
@@ -2253,7 +2245,6 @@ namespace pal
22532245
if ( !retainedChain )
22542246
{
22552247
retainedChain = current_chain;
2256-
bestChain = current_chain->delta;
22572248
#ifdef _DEBUG_FULL_
22582249
std::cout << "New chain, delta = " << current_chain->delta << std::endl;
22592250
#endif
@@ -2262,7 +2253,6 @@ namespace pal
22622253
{
22632254
delete_chain( retainedChain );
22642255
retainedChain = current_chain;
2265-
bestChain = current_chain->delta;
22662256
#ifdef _DEBUG_FULL_
22672257
std::cout << "New best chain, delta = " << current_chain->delta << std::endl;
22682258
#endif
@@ -2355,8 +2345,6 @@ namespace pal
23552345
best_cost = cur_cost;
23562346
memcpy( best_sol, sol, sizeof( int ) *subSize );
23572347

2358-
itBest = it;
2359-
23602348
stop_it = ( it + itwimp > maxit ? maxit : it + itwimp );
23612349
}
23622350
sort(( void** ) candidates, probSize, decreaseCost );

‎src/core/qgsgeometry.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,7 +3443,6 @@ QgsRectangle QgsGeometry::boundingBox()
34433443
int numLineStrings;
34443444
int idx, jdx, kdx;
34453445
unsigned char *ptr;
3446-
char lsb;
34473446
QgsPoint pt;
34483447
QGis::WkbType wkbType;
34493448
bool hasZValue = false;
@@ -3568,7 +3567,6 @@ QgsRectangle QgsGeometry::boundingBox()
35683567
for ( jdx = 0; jdx < numLineStrings; jdx++ )
35693568
{
35703569
// each of these is a wbklinestring so must handle as such
3571-
lsb = *ptr;
35723570
ptr += 5; // skip type since we know its 2
35733571
nPoints = ( int * ) ptr;
35743572
ptr += sizeof( int );
@@ -4135,7 +4133,6 @@ bool QgsGeometry::exportWkbToGeos()
41354133
int numLineStrings;
41364134
int idx, jdx, kdx;
41374135
unsigned char *ptr;
4138-
char lsb;
41394136
QgsPoint pt;
41404137
QGis::WkbType wkbtype;
41414138
bool hasZValue = false;
@@ -4226,7 +4223,6 @@ bool QgsGeometry::exportWkbToGeos()
42264223
QgsPolyline sequence;
42274224

42284225
// each of these is a wbklinestring so must handle as such
4229-
lsb = *ptr;
42304226
ptr += 5; // skip type since we know its 2
42314227
nPoints = ( int * ) ptr;
42324228
ptr += sizeof( int );
@@ -5165,7 +5161,6 @@ GEOSGeometry* QgsGeometry::reshapePolygon( const GEOSGeometry* polygon, const GE
51655161
}
51665162

51675163
GEOSGeometry** newInnerRings = new GEOSGeometry*[ringList.size()];
5168-
QList<GEOSGeometry*>::const_iterator it = ringList.constBegin();
51695164
for ( int i = 0; i < ringList.size(); ++i )
51705165
{
51715166
newInnerRings[i] = ringList.at( i );

‎src/core/qgsmaprenderer.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,8 @@ void QgsMapRenderer::render( QPainter* painter )
320320
}
321321
}
322322

323-
bool placeOverlays = false;
324323
QgsOverlayObjectPositionManager* overlayManager = overlayManagerFromSettings();
325324
QList<QgsVectorOverlay*> allOverlayList; //list of all overlays, used to draw them after layers have been rendered
326-
if ( overlayManager )
327-
{
328-
placeOverlays = true;
329-
}
330325

331326
// render all layers in the stack, starting at the base
332327
QListIterator<QString> li( mLayerSet );

‎src/core/qgsvectorlayer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4214,8 +4214,10 @@ void QgsVectorLayer::drawFeature( QgsRenderContext &renderContext,
42144214
// used in all cases of the statement (otherwise they may get
42154215
// executed, but never used, in a bit of code where performance is
42164216
// critical).
4217-
if ( ! fet.isValid() ) { return; }
4218-
bool needToTrim = false;
4217+
if ( ! fet.isValid() )
4218+
{
4219+
return;
4220+
}
42194221

42204222
QgsGeometry* geom = fet.geometry();
42214223
if ( !geom )
@@ -4283,10 +4285,8 @@ void QgsVectorLayer::drawFeature( QgsRenderContext &renderContext,
42834285
//QPointF pt( x, y );
42844286

42854287
// Work around a +/- 32768 limitation on coordinates
4286-
if ( qAbs( x ) > QgsClipper::MAX_X ||
4287-
qAbs( y ) > QgsClipper::MAX_Y )
4288-
needToTrim = true;
4289-
else
4288+
if ( qAbs( x ) <= QgsClipper::MAX_X &&
4289+
qAbs( y ) <= QgsClipper::MAX_Y )
42904290
p->drawImage( pt, *marker );
42914291
}
42924292
p->restore();

‎src/gui/qgsannotationitem.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ void QgsAnnotationItem::drawMarkerSymbol( QPainter* p )
216216
return;
217217
}
218218

219-
QPointF canvasPoint = toCanvasCoordinates( mMapPosition );
220219
if ( mMarkerSymbol )
221220
{
222221
mMarkerSymbol->startRender( renderContext );

‎src/gui/qgsmapoverviewcanvas.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ void QgsMapOverviewCanvas::updatePanningWidget( const QPoint& pos )
240240
{
241241
// if (mPanningWidget->isHidden())
242242
// return;
243-
QSize size = mPanningWidget->size();
244243
mPanningWidget->move( pos.x() - mPanningCursorOffset.x(), pos.y() - mPanningCursorOffset.y() );
245244
}
246245

‎src/gui/qgsquickprint.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,6 @@ void QgsQuickPrint::printMap()
247247
#endif
248248
QString myFontFamily = "Arial";
249249

250-
// Background color for pixmaps
251-
QColor myLegendBackgroundColor = Qt::white;
252-
//QColor myMapBackgroundColor = "#98dbf9"; // nice blue color
253-
254-
255250
//
256251
// Draw the PageBorder
257252
//

‎src/mapserver/qgssldparser.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme
767767
{
768768
if ( !labelBufferElementList.item( 0 ).toElement().isNull() )
769769
{
770-
double radius = 5.0;
771770
QDomNodeList cssNodes = labelBufferElementList.item( 0 ).toElement().elementsByTagName( "CssParameter" );
772771
QString cssName;
773772
QDomElement currentElement;
@@ -833,6 +832,13 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme
833832
}
834833
}
835834
}
835+
836+
//QgsMapServerLogger::instance()->printMessage("radius " + QString::number(radius));
837+
myLabelAttributes->setBufferEnabled( true );
838+
myLabelAttributes->setBufferColor( QColor( polyColorRed, polyColorGreen, polyColorBlue, opacity ) );
839+
840+
#if 0
841+
double radius = 5.0;
836842
QDomElement radiusElement = labelBufferElementList.item( 0 ).toElement().elementsByTagName( "Radius" ).item( 0 ).toElement();
837843
if ( !radiusElement.isNull() )
838844
{
@@ -843,10 +849,8 @@ bool QgsSLDParser::labelSettingsFromUserStyle( const QDomElement& userStyleEleme
843849
radius = 5.0;
844850
}
845851
}
846-
//QgsMapServerLogger::instance()->printMessage("radius " + QString::number(radius));
847-
myLabelAttributes->setBufferEnabled( true );
848-
myLabelAttributes->setBufferColor( QColor( polyColorRed, polyColorGreen, polyColorBlue, opacity ) );
849-
//myLabelAttributes->setBufferSize(radius, QgsLabelAttributes::PointUnits);
852+
myLabelAttributes->setBufferSize( radius, QgsLabelAttributes::PointUnits );
853+
#endif
850854

851855
// ******** BUG ************ see why setting buffersize dows not work (is a problem in QGIS vector layer rendering)
852856

@@ -1397,13 +1401,11 @@ QgsVectorLayer* QgsSLDParser::contourLayerFromRaster( const QDomElement& userSty
13971401
/* -------------------------------------------------------------------- */
13981402
/* Invoke. */
13991403
/* -------------------------------------------------------------------- */
1400-
CPLErr eErr;
1401-
1402-
eErr = GDALContourGenerate( hBand, dfInterval, dfOffset,
1403-
nFixedLevelCount, adfFixedLevels,
1404-
bNoDataSet, dfNoData,
1405-
hLayer, 0, nElevField,
1406-
GDALTermProgress, NULL );
1404+
GDALContourGenerate( hBand, dfInterval, dfOffset,
1405+
nFixedLevelCount, adfFixedLevels,
1406+
bNoDataSet, dfNoData,
1407+
hLayer, 0, nElevField,
1408+
GDALTermProgress, NULL );
14071409

14081410
delete adfFixedLevels;
14091411

‎src/mapserver/qgssoaprequesthandler.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ std::map<QString, QString> QgsSOAPRequestHandler::parseInput()
102102
}
103103

104104
// if xml reading was successfull, save the inputXML in a file
105-
time_t t;
106-
struct tm *currentTime;
107-
time( &t );
108-
currentTime = localtime( &t );
109-
110105
QFile soapFile;
111106
QTextStream soapStream;
112107

‎src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,9 +1483,6 @@ bool DL_Dxf::handleLeaderData( DL_CreationInterface* /*creationInterface*/ )
14831483
*/
14841484
bool DL_Dxf::handleHatchData( DL_CreationInterface* /*creationInterface*/ )
14851485
{
1486-
1487-
static int firstPolylineStatus = 0;
1488-
14891486
// Allocate hatch loops (group code 91):
14901487
if ( groupCode == 91 && toInt( groupValue ) > 0 )
14911488
{
@@ -1552,16 +1549,13 @@ bool DL_Dxf::handleHatchData( DL_CreationInterface* /*creationInterface*/ )
15521549
dropEdges = false;
15531550

15541551
hatchLoopIndex++;
1555-
hatchLoops[hatchLoopIndex]
1556-
= DL_HatchLoopData( toInt( groupValue ) );
1552+
hatchLoops[hatchLoopIndex] = DL_HatchLoopData( toInt( groupValue ) );
15571553

15581554
maxHatchEdges[hatchLoopIndex] = toInt( groupValue );
15591555
hatchEdgeIndex[hatchLoopIndex] = -1;
1560-
hatchEdges[hatchLoopIndex]
1561-
= new DL_HatchEdgeData[toInt( groupValue )];
1556+
hatchEdges[hatchLoopIndex] = new DL_HatchEdgeData[toInt( groupValue )];
15621557

15631558
// QgsDebugMsg(QString("hatchEdges[%1] = new %2").arg(hatchLoopIndex).arg(toInt(groupValue)));
1564-
firstPolylineStatus = 0;
15651559
}
15661560
else
15671561
{

‎src/plugins/grass/qgsgrassbrowser.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ void QgsGrassBrowser::addMap()
137137
QgsDebugMsg( "entered." );
138138

139139
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
140-
bool mapSelected = false;
141140

142141
QList<QModelIndex>::const_iterator it = indexes.begin();
143142
for ( ; it != indexes.end(); ++it )
@@ -152,7 +151,6 @@ void QgsGrassBrowser::addMap()
152151
//mIface->addRasterLayer( uri, map );
153152
mIface->addRasterLayer( uri, map, "grassraster", QStringList(), QStringList(),
154153
QString(), QString() );
155-
mapSelected = true;
156154
}
157155
else if ( type == QgsGrassModel::Vector )
158156
{
@@ -177,7 +175,6 @@ void QgsGrassBrowser::addMap()
177175
map, layer, list.size() );
178176

179177
mIface->addVectorLayer( uri, name, "grass" );
180-
mapSelected = true;
181178
}
182179
else if ( type == QgsGrassModel::Region )
183180
{

‎src/plugins/grass/qgsgrassedit.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,12 +1463,6 @@ void QgsGrassEdit::addAttributes( int field, int cat )
14631463
}
14641464
else
14651465
{
1466-
int size;
1467-
if ( atts->size() < ( int ) cols->size() )
1468-
size = atts->size();
1469-
else
1470-
size = cols->size();
1471-
14721466
for ( unsigned int j = 0; j < cols->size(); j++ )
14731467
{
14741468
QgsField col = ( *cols )[j];

‎src/plugins/grass/qgsgrassnewmapset.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,6 @@ void QgsGrassNewMapset::setMapsets()
11471147
QDir d( locationPath );
11481148

11491149
// Add all subdirs containing WIND
1150-
QTreeWidgetItem *lvi;
11511150
for ( unsigned int i = 0; i < d.count(); i++ )
11521151
{
11531152
if ( d[i] == "." || d[i] == ".." ) continue;
@@ -1158,7 +1157,7 @@ void QgsGrassNewMapset::setMapsets()
11581157

11591158
if ( QFile::exists( windPath ) )
11601159
{
1161-
lvi = new QTreeWidgetItem( mMapsetsListView, QStringList() << d[i] << mapsetInfo.owner() );
1160+
new QTreeWidgetItem( mMapsetsListView, QStringList() << d[i] << mapsetInfo.owner() );
11621161
}
11631162
}
11641163
}

‎src/plugins/grass/qtermwidget/TerminalDisplay.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,6 @@ void TerminalDisplay::extendSelection( const QPoint& position )
17471747
// this widget.
17481748

17491749
// Adjust position within text area bounds. See FIXME above.
1750-
QPoint oldpos = pos;
17511750
if ( pos.x() < tLx + _leftMargin )
17521751
pos.setX( tLx + _leftMargin );
17531752
if ( pos.x() > tLx + _leftMargin + _usedColumns*_fontWidth - 1 )

‎src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ void QgsRasterTerrainAnalysisPlugin::run()
8282
QString analysisMethod = d.selectedAnalysisMethod();
8383
QString selectedFormat = d.selectedDriverKey();
8484
QString outputFile = d.selectedOuputFilePath();
85-
int returnValue;
8685

8786
QgsNineCellFilter* filter = 0;
8887
if ( d.selectedAnalysisMethod() == tr( "Slope" ) )
@@ -106,7 +105,7 @@ void QgsRasterTerrainAnalysisPlugin::run()
106105
{
107106
QProgressDialog p( tr( "Calculating " ) + d.selectedAnalysisMethod() + "...", tr( "Abort..." ), 0, 0 );
108107
p.setWindowModality( Qt::WindowModal );
109-
returnValue = filter->processRaster( &p );
108+
filter->processRaster( &p );
110109
delete filter;
111110
if ( d.addLayerToProject() )
112111
{

‎src/providers/grass/qgis.d.rast.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ int main( int argc, char **argv )
2727
{
2828
char *mapset;
2929
char *name;
30-
int fp;
3130
struct GModule *module;
3231
struct Option *map;
3332
struct Option *win;
@@ -81,14 +80,7 @@ int main( int argc, char **argv )
8180
G_set_window( &window );
8281

8382
raster_type = G_raster_map_type( name, "" );
84-
fp = G_raster_map_is_fp( name, mapset );
85-
86-
/* use DCELL even if the map is FCELL */
87-
// Why? It would break dataType in provider.
88-
//if ( fp )
89-
// display( name, mapset, DCELL_TYPE, format->answer );
90-
//else
91-
// display( name, mapset, CELL_TYPE, format->answer );
83+
9284
display( name, mapset, raster_type, format->answer );
9385

9486
exit( EXIT_SUCCESS );
@@ -198,9 +190,6 @@ static int cell_draw( char *name,
198190
}
199191
else
200192
{
201-
int *val;
202-
val = ( int* )( ptr );
203-
//G_debug ( 0, "val = %d", *val );
204193
if ( data_type == CELL_TYPE )
205194
{
206195
//G_debug ( 0, "valx = %d", *((CELL *) ptr));

0 commit comments

Comments
 (0)
Please sign in to comment.