[GRASS-SVN] r72375 - grass/trunk/vector/v.random
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 16 07:30:48 PDT 2018
Author: martinl
Date: 2018-03-16 07:30:48 -0700 (Fri, 16 Mar 2018)
New Revision: 72375
Modified:
grass/trunk/vector/v.random/main.c
Log:
v.random: fix comparison between signed and unsigned integer expressions warnings (TODO: replace long with int64)
Modified: grass/trunk/vector/v.random/main.c
===================================================================
--- grass/trunk/vector/v.random/main.c 2018-03-16 12:07:20 UTC (rev 72374)
+++ grass/trunk/vector/v.random/main.c 2018-03-16 14:30:48 UTC (rev 72375)
@@ -189,7 +189,7 @@
seed = atoi(parm.seed->answer);
if (n <= 0) {
- G_fatal_error(_("Number of points must be > 0 (%d given)"), n);
+ G_fatal_error(_("Number of points must be > 0 (%ld given)"), n);
}
nareas = 0;
@@ -457,7 +457,7 @@
Vect_append_point(Points, x, y, 0.0);
if (parm.zcol->answer) {
- sprintf(buf, "insert into %s values ( %d, ", Fi->table, i + 1);
+ sprintf(buf, "insert into %s values ( %ld, ", Fi->table, i + 1);
db_set_string(&sql, buf);
/* Round random value if column is integer type */
if (usefloat)
@@ -577,7 +577,7 @@
Vect_append_point(Points, x, y, 0.0);
if (parm.zcol->answer) {
- sprintf(buf, "insert into %s values ( %d, ", Fi->table, i + 1);
+ sprintf(buf, "insert into %s values ( %ld, ", Fi->table, i + 1);
db_set_string(&sql, buf);
/* Round random value if column is integer type */
if (usefloat)
More information about the grass-commit
mailing list