[GRASS-dev] [GRASS-SVN] r60048 - grass/trunk/vector/v.in.db

Glynn Clements glynn at gclements.plus.com
Mon May 5 05:44:03 PDT 2014


Huidae Cho wrote:

> BTW, I don't see Rast_open_old returning a negative value on failure as
> documented in the developer's manual. If this is clearly documented and
> fatal error is also mentioned, it would save unnecessary conditional checks
> against Rast_open_old.

The 6.x versions (G_open_cell_old() etc) are documented as returning
-1 on failure (at least in the Doxygen comments, which should end up
in the manual).

The 7.x versions (Rast_open_old() etc) raise fatal errors, so any
checks for a negative return value would be redundant. Such checks
should have been removed by r40215, but I can't rule out having missed
some.

In cases where the return value was purely a status indication,
eliminating the status return resulted in the return type changing
from int to void. Anything checking the (now-void) return value would
result in a compilation error, so I doubt that I missed any.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list