Incompatible types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nevermind, my bad!


On Thu, Sep 10, 2015 at 11:36 AM, David Villasmil Govea <
david.villasmil at gmail.com> wrote:

> Hello guys,
>
> I'm trying to compile in mac osx the code in
> http://www.pjsip.org/pjmedia/docs/html/page_pjsip_perf_c.htm
>
> and the compiler is coming back with:
>
>
> stress_test.cc:182:6: error: assigning to 'pjsip_uri *' from incompatible
> type 'void *'
>  uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
>      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:243:6: error: assigning to 'pjsip_uri *' from incompatible
> type 'void *'
>  uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
>      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:359:15: error: cannot initialize a variable of type 'struct
> call *' with an lvalue of type 'void *'
>  struct call *call = entry->user_data;
>               ^      ~~~~~~~~~~~~~~~~
> stress_test.cc:380:6: error: assigning to 'pjsip_uri *' from incompatible
> type 'void *'
>  uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
>      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:451:7: error: assigning to 'struct call *' from
> incompatible type 'void *'
>  call = pj_pool_zalloc(dlg->pool, sizeof(struct call));
>       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:770:20: error: assigning to 'char *' from incompatible type
> 'void *'
>  app.local_uri.ptr = pj_pool_alloc(app.pool, 128);
>                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:1009:7: error: assigning to 'struct call *' from
> incompatible type 'void *'
>  call = pj_pool_zalloc(dlg->pool, sizeof(struct call));
>       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> stress_test.cc:1065:6: error: assigning to 'char *' from incompatible type
> 'void *'
>  url = pj_pool_alloc(pool, len+1);
>      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
> 8 errors generated.
> make[2]: *** [build/Debug/GNU-MacOSX/stress_test.o] Error 1
> make[1]: *** [.build-conf] Error 2
> make: *** [.build-impl] Error 2
>
> BUILD FAILED (exit value 2, total time: 514ms)
>
>
> I was able to compile a simple code that registered and made a call, so I
> know the library is fine. I also tried to cast them, to no avail...
>
> Help is greately appreciated
>
> David
> --
> DVG
>
> --
> Imagination is more important than knowledge
> Albert Einstein
>



-- 
DVG

-- 
Imagination is more important than knowledge
Albert Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150910/b0f7e843/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux