#197: sfd support for r.terraflow
--------------------------+-------------------------------------------------
  Reporter:  adanner      |       Owner:  grass-dev@lists.osgeo.org
      Type:  defect       |      Status:  new                      
  Priority:  major        |   Milestone:  7.0.0                    
 Component:  Raster       |     Version:  svn-trunk                
Resolution:               |    Keywords:  terraflow r.terraflow    
  Platform:  Unspecified  |         Cpu:  Unspecified              
--------------------------+-------------------------------------------------
Comment (by glynn):

 Replying to [comment:8 adanner]:

 > > Correct. Which is why the interface needs to be fixed in C; i.e. add
 the "const" to the fields of "struct Option" in gis.h. Having the compiler
 remind people about this on a regular basis is the best way to make it
 happen.
 > >
 > > Actually, I'll look into that side of it now.
 >
 > Thanks, that eliminates many of the warnings. There are only four left
 on options->answer, but I'm content with only four warnings. Fixing those
 last four require some tedious buffer creation/copying.

 It should suffice to use:

 opt->answer = G_store("literal");

 The current interface permits modules to modify the ->answer field, and
 some do.

 Hmm. Actually, changing the "answer" field only causes compilation
 failures for 3 modules (d.linegraph, i.atcorr and r.terraflow).
 d.linegraph does actually modify the value in place, but that isn't hard
 to fix. The other two only complain because they're in C++.

 However, there are quite a few "incompatible pointer type" warnings. I
 suspect that most of those are just because someone simply forgot to add
 the "const" to a parameter declaration, but checking for any cases where
 it does actually matter could take a while.

 The hardest ones to deal with are where pointers are passed to the DBMI
 functions (directly or through the vector functions), as hardly any char*
 parameters have the "const" qualifier.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/197#comment:9>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to