Skip to content

Commit

Permalink
Fix some more compiler warnings. Apply -Werror to grass directories.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6627 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 18, 2007
1 parent 535f69a commit f1b09b5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/plugins/grass/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ SUBDIRS(config modules themes)

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
MESSAGE("plugins/grass : -Werror removed for this directory for now - please get rid of all warnings!")
REMOVE_DEFINITIONS( -Werror )

########################################################
# Files
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/grass/qgsgrassnewmapset.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/***************************************************************************
qgsgrassnewmapset.cpp - New GRASS mapset wizard
-------------------
Expand Down Expand Up @@ -61,6 +62,11 @@

// For bug in GPJ_osr_to_grass()
#include "grass/version.h"
// Prevents some compiler warnings from the version.h include
QString temp1(GRASS_VERSION_STRING);
QString temp2(GRASS_VERSION_MAJOR);
QString temp3(GRASS_VERSION_MINOR);
QString temp4(GRASS_VERSION_RELEASE);

bool QgsGrassNewMapset::mRunning = false;

Expand Down
2 changes: 0 additions & 2 deletions src/providers/grass/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
MESSAGE("providers/grass : -Werror removed for this directory for now - please get rid of all warnings!")
REMOVE_DEFINITIONS( -Werror )

########################################################
# Files
Expand Down
8 changes: 8 additions & 0 deletions src/providers/grass/qgsgrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,14 @@ int QgsGrass::versionMinor()
{
return QString(GRASS_VERSION_MINOR).toInt();
}
int QgsGrass::versionRelease()
{
return QString(GRASS_VERSION_RELEASE).toInt();
}
QString QgsGrass::versionString()
{
return QString(GRASS_VERSION_STRING);
}

bool QgsGrass::isMapset ( QString path )
{
Expand Down
2 changes: 2 additions & 0 deletions src/providers/grass/qgsgrass.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ class QgsGrass {
//! Library version
static int versionMajor();
static int versionMinor();
static int versionRelease();
static QString versionString();

private:
static int initialized; // Set to 1 after initialization
Expand Down

0 comments on commit f1b09b5

Please sign in to comment.