[GRASS-dev] string madness

Markus Neteler neteler at itc.it
Sat Mar 17 14:08:09 EDT 2007


Hi Daniel,

On Sat, Mar 17, 2007 at 11:10:27AM -0500, Daniel Calvelo wrote:
> Hi Markus,
> 
> On 3/17/07, Markus Neteler <neteler at itc.it> wrote:
> [...]
> >Apparently the db_set_string() fails.
> >Adding debug output to db_set_string() in lib/db/dbmi_base/string.c
> >shows that the date string does not "reach" db_set_string() above.
> >Maybe the '-' chars in 2001-04-03 are evil for db_set_string()?
> 
> What reaches db_set_string()? NULL?

err, how to find out?
With 'ddd' I never reach any DBMI code, it get's me into
XDR and then I receive the result. "step" doesn't step into
DBMI.
 
> Don't you get a warning when compiling? sqlite3_column_text() returns
> a const unsigned char * and db_set_string expects a plain char *.i

Indeed:
fetch.c:121: warning: passing argument 2 of ‘db_set_string’ discards qualifiers from pointer target type


> My guess is casting problems.

That might be the case (no idea how to declare it, though).

Markus




More information about the grass-dev mailing list