Skip to content

Commit

Permalink
fix some warnings & build errors (Linux/Windows)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12882 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 4, 2010
1 parent bc924c2 commit ee647d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/providers/grass/CMakeLists.txt
Expand Up @@ -77,12 +77,14 @@ ADD_EXECUTABLE(qgis.d.rast ${QGIS_D_RAST_SRCS})

TARGET_LINK_LIBRARIES (qgis.d.rast
${GRASS_LIBRARY_gis}
${GRASS_LIBRARY_datetime}
)

ADD_EXECUTABLE(qgis.g.info ${QGIS_G_INFO_SRCS})

TARGET_LINK_LIBRARIES (qgis.g.info
${GRASS_LIBRARY_gis}
${GRASS_LIBRARY_datetime}
${GRASS_LIBRARY_gproj}
)

Expand Down
8 changes: 2 additions & 6 deletions src/providers/grass/qgis.d.rast.c
Expand Up @@ -10,6 +10,8 @@
* License (>=v2).
*
*****************************************************************************/
#define PACKAGE "grassmods"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -25,13 +27,9 @@ int main(int argc, char **argv)
char *mapset;
char *name;
int fp;
int cols, rows;
struct GModule *module;
struct Option *map;
struct Option *win;
struct Flag *flag_o;
struct Flag *flag_i;
struct Flag *flag_x;
struct Cell_head window;

/* Initialize the GIS calls */
Expand Down Expand Up @@ -89,7 +87,6 @@ int display(char *name,
RASTER_MAP_TYPE data_type)
{
struct Colors colors;
int r, g, b;

if (G_read_colors(name, mapset, &colors) == -1)
G_fatal_error(_("Color file for <%s> not available"), name);
Expand All @@ -113,7 +110,6 @@ static int cell_draw(char *name,
int cellfile;
void *xarray;
int row;
int t, b, l, r;
int ncols, nrows;
static unsigned char *red, *grn, *blu, *set;
int i;
Expand Down
8 changes: 4 additions & 4 deletions src/providers/grass/qgis.g.info.c
Expand Up @@ -10,6 +10,8 @@
* License (>=v2).
*
*****************************************************************************/
#define PACKAGE "grassmods"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -21,8 +23,6 @@

int main(int argc, char **argv)
{
char *mapset;
char *name;
struct GModule *module;
struct Option *info_opt, *rast_opt, *vect_opt, *coor_opt;
struct Cell_head window;
Expand Down Expand Up @@ -96,8 +96,8 @@ int main(int argc, char **argv)
G_get_cellhd( rast_opt->answer, "", &window);
G_set_window(&window);
fd = G_open_cell_old( rast_opt->answer, "");
col = G_easting_to_col( x, &window);
row = G_northing_to_row( y, &window);
col = (int) G_easting_to_col( x, &window);
row = (int) G_northing_to_row( y, &window);
if (col == window.cols) col--;
if (row == window.rows) row--;

Expand Down

0 comments on commit ee647d4

Please sign in to comment.