[GRASS-dev] GRASS 7 swig compile warnings and errors

Markus Neteler neteler at osgeo.org
Mon Jan 19 07:18:53 EST 2009


On Mon, Jan 19, 2009 at 12:37 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> >> I get warnings and errors in swig/python/:
>> >
>> >> grass_wrap.c: In function '_wrap_G_vasprintf':
>> >> grass_wrap.c:18166: error: incompatible types in assignment
>> >
>> > No idea what's causing this. For me, line 18166 is:
>> >
>> >      arg3 = *((va_list *)(argp3));
>> >
>> > with arg3 defined as:
>> >
>> >  va_list arg3 ;
>> >
>> > The others are just warnings.
>>
>> I have
>>
>>     if (!argp3) {
>>       SWIG_exception_fail(SWIG_ValueError, "invalid null reference "
>> "in method '" "G_vasprintf" "', argument " "3"" of type '"
>> "va_list""'");
>>     } else {
>>       arg3 = *((va_list *)(argp3));
>>     }
>
> What does the declaration of arg3 look like?

The function header looks like this:

SWIGINTERN PyObject *_wrap_G_vasprintf(PyObject *SWIGUNUSEDPARM(self),
PyObject *args) {
  PyObject *resultobj = 0;
  char **arg1 = (char **) 0 ;
  char *arg2 = (char *) 0 ;
  va_list arg3 ;                       <<<----
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;


Markus


More information about the grass-dev mailing list