Now I get the following error (with gcc version 4.3.3 (Debian 4.3.3-10))
$ cc -I../asterisk/include -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -Wall -c member.c -o member.o
member.c: In function 'member_exec':
member.c:146: warning: format '%s' expects type 'char *', but argument 6
has type 'union <anonymous>'
I tried to cast f->data with (char*)... but this won't work, too:
...
member.c:146: error: cannot convert to a pointer type
member.c:146: warning: reading through null pointer (argument 6)
member.c:147: error: cannot convert to a pointer type
...
Hell, what am I doing wrong?
Regards, Holger
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Now I get the following error (with gcc version 4.3.3 (Debian 4.3.3-10))
$ cc -I../asterisk/include -I/usr/lib/glib-2.0/include
-I/usr/include/glib-2.0 -Wall -c member.c -o member.o
member.c: In function 'member_exec':
member.c:146: warning: format '%s' expects type 'char *', but argument 6
has type 'union <anonymous>'
I tried to cast f->data with (char*)... but this won't work, too:
Right, so this change was to allow you to access the element as multiple
types, without needing to cast, but you need to add an extra argument onto
the end to get this. So change your invocation of f->data to f->data.ptr
(since you want a pointer). You could also use f->data.uint32, if you wanted
an integer type.
--
Tilghman
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum