Skip to content

Commit b3af78d

Browse files
author
jef
committed
fix some warnings & build errors (Linux/Windows)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12882 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4a2d088 commit b3af78d

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/providers/grass/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ ADD_EXECUTABLE(qgis.d.rast ${QGIS_D_RAST_SRCS})
7777

7878
TARGET_LINK_LIBRARIES (qgis.d.rast
7979
${GRASS_LIBRARY_gis}
80+
${GRASS_LIBRARY_datetime}
8081
)
8182

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

8485
TARGET_LINK_LIBRARIES (qgis.g.info
8586
${GRASS_LIBRARY_gis}
87+
${GRASS_LIBRARY_datetime}
8688
${GRASS_LIBRARY_gproj}
8789
)
8890

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* License (>=v2).
1111
*
1212
*****************************************************************************/
13+
#define PACKAGE "grassmods"
14+
1315
#include <stdlib.h>
1416
#include <stdio.h>
1517
#include <string.h>
@@ -25,13 +27,9 @@ int main(int argc, char **argv)
2527
char *mapset;
2628
char *name;
2729
int fp;
28-
int cols, rows;
2930
struct GModule *module;
3031
struct Option *map;
3132
struct Option *win;
32-
struct Flag *flag_o;
33-
struct Flag *flag_i;
34-
struct Flag *flag_x;
3533
struct Cell_head window;
3634

3735
/* Initialize the GIS calls */
@@ -89,7 +87,6 @@ int display(char *name,
8987
RASTER_MAP_TYPE data_type)
9088
{
9189
struct Colors colors;
92-
int r, g, b;
9390

9491
if (G_read_colors(name, mapset, &colors) == -1)
9592
G_fatal_error(_("Color file for <%s> not available"), name);
@@ -113,7 +110,6 @@ static int cell_draw(char *name,
113110
int cellfile;
114111
void *xarray;
115112
int row;
116-
int t, b, l, r;
117113
int ncols, nrows;
118114
static unsigned char *red, *grn, *blu, *set;
119115
int i;

src/providers/grass/qgis.g.info.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* License (>=v2).
1111
*
1212
*****************************************************************************/
13+
#define PACKAGE "grassmods"
14+
1315
#include <stdlib.h>
1416
#include <stdio.h>
1517
#include <string.h>
@@ -21,8 +23,6 @@
2123

2224
int main(int argc, char **argv)
2325
{
24-
char *mapset;
25-
char *name;
2626
struct GModule *module;
2727
struct Option *info_opt, *rast_opt, *vect_opt, *coor_opt;
2828
struct Cell_head window;
@@ -96,8 +96,8 @@ int main(int argc, char **argv)
9696
G_get_cellhd( rast_opt->answer, "", &window);
9797
G_set_window(&window);
9898
fd = G_open_cell_old( rast_opt->answer, "");
99-
col = G_easting_to_col( x, &window);
100-
row = G_northing_to_row( y, &window);
99+
col = (int) G_easting_to_col( x, &window);
100+
row = (int) G_northing_to_row( y, &window);
101101
if (col == window.cols) col--;
102102
if (row == window.rows) row--;
103103

0 commit comments

Comments
 (0)