Skip to content
Permalink
Browse files

fix some warnings & build errors (Linux/Windows)

git-svn-id: http://svn.osgeo.org/qgis/trunk@12882 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 4, 2010
1 parent bc924c2 commit ee647d48367ad754f5e0b99c93d8e618cb31ae38
Showing with 8 additions and 10 deletions.
  1. +2 −0 src/providers/grass/CMakeLists.txt
  2. +2 −6 src/providers/grass/qgis.d.rast.c
  3. +4 −4 src/providers/grass/qgis.g.info.c
@@ -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}
)

@@ -10,6 +10,8 @@
* License (>=v2).
*
*****************************************************************************/
#define PACKAGE "grassmods"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -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 */
@@ -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);
@@ -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;
@@ -10,6 +10,8 @@
* License (>=v2).
*
*****************************************************************************/
#define PACKAGE "grassmods"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -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;
@@ -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--;

0 comments on commit ee647d4

Please sign in to comment.
You can’t perform that action at this time.