Skip to content

Commit

Permalink
Fix some compiler warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@6448 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jan 21, 2007
1 parent 92d9665 commit e982da1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
3 changes: 3 additions & 0 deletions src/app/main.cpp
Expand Up @@ -193,6 +193,9 @@ void myMessageOutput( QtMsgType type, const char *msg )
case QtDebugMsg:
fprintf( stderr, "Debug: %s\n", msg );
break;
case QtCriticalMsg:
fprintf( stderr, "Critical: %s\n", msg );
break;
case QtWarningMsg:
fprintf( stderr, "Warning: %s\n", msg );

Expand Down
6 changes: 2 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -1264,13 +1264,13 @@ bool QgisApp::createDB()
//now copy the master file into the users .qgis dir
bool isDbFileCopied = masterFile.copy(qgisPrivateDbFile.name());

#ifdef QGISDEBUG
if (!isDbFileCopied)
{
#ifdef QGISDEBUG
std::cout << "[ERROR] Can not make qgis.db private copy" << std::endl;
return FALSE;
}
#endif
}
}
return TRUE;
}
Expand Down Expand Up @@ -2590,8 +2590,6 @@ void QgisApp::newVectorLayer()
//try to create the new layer with OGRProvider instead of QgsVectorFileWriter
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
QString ogrlib = pReg->library("ogr");
// This var is not used...remove? TS FIXME
const char *cOgrLib = (const char *) ogrlib;
// load the data provider
QLibrary* myLib = new QLibrary((const char *) ogrlib);
bool loaded = myLib->load();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsabout.cpp
Expand Up @@ -61,7 +61,7 @@ void QgsAbout::init()
if ( file.open( QIODevice::ReadOnly ) ) {
QTextStream stream( &file );
QString line;
int i = 1;

while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsattributetable.cpp
Expand Up @@ -162,7 +162,7 @@ void QgsAttributeTable::sortColumn(int col, bool ascending, bool wholeRows)
//if the first entry contains a letter, sort alphanumerically, otherwise numerically
QString firstentry = text(0, col);
bool containsletter = false;
for (uint i = 0; i < firstentry.length(); i++)
for (int i = 0; i < firstentry.length(); i++)
{
if (firstentry.ref(i).isLetter())
{
Expand Down Expand Up @@ -278,7 +278,7 @@ void QgsAttributeTable::popupMenu(int row, int col, const QPoint& pos)
if (mActionPopup == 0)
{
mActionPopup = new QMenu();
QAction *a = mActionPopup->addAction( tr("Run action") );
mActionPopup->addAction( tr("Run action") );
mActionPopup->addSeparator();

QgsAttributeAction::aIter iter = mActions.begin();
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgshttptransaction.cpp
Expand Up @@ -37,12 +37,12 @@ QgsHttpTransaction::QgsHttpTransaction(QString uri,
int proxyPort,
QString proxyUser,
QString proxyPass)
: httpurl(uri),
: httpresponsecontenttype(0),
httpurl(uri),
httphost(proxyHost),
httpport(proxyPort),
httpuser(proxyUser),
httppass(proxyPass),
httpresponsecontenttype(0),
mError(0)
{

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabel.cpp
Expand Up @@ -433,7 +433,7 @@ void QgsLabel::setLabelField ( int attr, const QString str )
mLabelField[attr] = str;

mLabelFieldIdx[attr] = -1;
for ( uint i = 0; i < mField.size(); i++ )
for ( int i = 0; i < mField.size(); i++ )
{
if ( mField[i].name().compare(str) == 0 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorfilewriter.cpp
Expand Up @@ -492,7 +492,7 @@ QString QgsVectorFileWriter::writeVectorLayerAsShapefile(QString shapefileName,
// create the fields
QgsDebugMsg("creating " + QString("%d").arg(attributeFields.size()) + " fields");

for (uint i = 0; i < attributeFields.size(); i++)
for (int i = 0; i < attributeFields.size(); i++)
{
// check the field length - if > 10 we need to truncate it
QgsField attrField = attributeFields[i];
Expand Down

0 comments on commit e982da1

Please sign in to comment.