[GRASS5] GRASS 5.1 v.in.ascii bug

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed May 7 11:40:08 EDT 2003


Hello
I was trying to run the GRASS 5.1 tour script and encountered a problem
with v.in.ascii. The imported maps were empty apart from the header
metadata lines. I looked at the source code and the problem seems to be
that in vector/v.in.ascii/a2b.c the variable n_points is referenced without
being initialised to a value. On line 49 there is
    if (!n_points)
        continue;
If I comment out those two lines it seems to work fine. This seems to be
quite a major bug. Probably that is not the correct solution though.

Out of interest I tried compiling the same module on Linux using gcc and
sure enough the warning came up
a2b.c:21: warning: `n_points' might be used uninitialized in this function

All the new modules seem to generate so many warnings. If we could get rid
of them it would probably fix a lot of the bugs as well.

Paul




More information about the grass-dev mailing list