lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [lwip] sys_thread_new and compiler errors reported by diab


From: Ganesh Subramaniam
Subject: [lwip-users] [lwip] sys_thread_new and compiler errors reported by diab
Date: Wed, 08 Jan 2003 23:43:30 -0000

This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
        boundary="----=_NextPart_000_00C9_01C16DFC.45DECCA0"

------=_NextPart_000_00C9_01C16DFC.45DECCA0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Iam not sure if the issues below have been considered in the latest =
release. Iam using version 0.4.2 as yet. Iam sorry, if its already been =
taken care of.

A)
Some of the OS (like ucos-ii) need additional arguments to the function =
that creates a task/thread. The arguments like a task stack (stack size =
or pointer to task stack) and task priority is required. It would be =
nice if the sys_thread_new handled these new input variables in the lwip =
code. The sys_arch for a specific arch can use the inputs to the =
sys_thread_new as required. Your comments ...

B)
Trying to compile 0.4.2 version with diab compiler enabling compiler =
lint options.
The compiler caught a few obvious errors. Thought, Adam could get them =
fixed in the next release.=20


1)

In file /src/core/proto/ipv4/ip.c=20
void ip_input(struct pbuf *p, struct netif *inp)=20

But, in definition and prototypes..
struct netif *
netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,
          struct ip_addr *gw,
          void (* init)(struct netif *netif),
          err_t (* input)(struct pbuf *p, struct netif *netif))


2)

In file /src/arch/ucosppc/sys_arch.c
void sys_timeout(unsigned int msecs, sys_timeout_handler h, void *data)

In prototype declaration ..
void sys_timeout(u16_t msecs, sys_timeout_handler h, void *data);


3) In file
"apps/httpd.c" line 116
"apps/tcpecho.c" line 75

netbuf_data(buf, (void *)&data, &len);
Here len is  defined as static int len in httpd.c and int in tcpecho.c

The prototype has len declared as u16_t
err_t             netbuf_data     (struct netbuf *buf,
                                   void **dataptr, u16_t *len);

4)
"apps/httpd.c" line 149
"apps/http_noapi.c"  line 139

hexprint((u16_t *)&stats, (u16_t)(sizeof(struct stats) / sizeof(u16_t)),
                   statsbuf);

should be=20
hexprint((u16_t *)&stats, (u16_t)(sizeof(struct stats_) / =
sizeof(u16_t)),
                   statsbuf);

5)
"../../src/netif/nullif.c", line 58: error (dcc:1554): illegal type(s): =
ptr-to-func-ret-err_t '=3D' ptr-to-func-ret-int

6)
"../../src/engine/lib/netif.c", line 62: error (dcc:1554): illegal =
type(s): ptr-to-func-ret-err_t '=3D' ptr-to-func-ret-void


Thanks
Ganesh




------=_NextPart_000_00C9_01C16DFC.45DECCA0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>Iam not sure if the issues below have been =
considered in=20
the latest release. Iam using version 0.4.2 as yet. Iam sorry, if its =
already=20
been taken care of.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>A)</FONT></DIV>
<DIV><FONT face=3DCourier>
<DIV><FONT face=3DCourier>Some of the OS (like ucos-ii) need additional =
arguments=20
to the function that creates&nbsp;a task/thread. The arguments like a =
task stack=20
(stack size or pointer to task stack) and task priority=20
is&nbsp;required.&nbsp;It would be nice if the&nbsp;sys_thread_new =
handled these=20
new input variables in the lwip code. The sys_arch for a specific arch =
can use=20
the inputs to the sys_thread_new&nbsp;as required. Your comments=20
...</FONT></DIV></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>B)</FONT></DIV>
<DIV><FONT face=3DCourier>
<DIV><FONT face=3DCourier>Trying to compile 0.4.2 version with diab =
compiler=20
enabling compiler lint options.</FONT></DIV>
<DIV><FONT face=3DCourier>The compiler caught a few obvious errors. =
Thought, Adam=20
could get them fixed i</FONT><FONT face=3DCourier>n the next release.=20
</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>In file /src/core/proto/ipv4/ip.c =
</FONT></DIV>
<DIV><FONT face=3DCourier>void ip_input(struct pbuf *p, struct netif =
*inp)=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>
<DIV><FONT face=3DCourier>But, in definition and=20
prototypes..</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DCourier>struct netif *<BR>netif_add(struct ip_addr =
*ipaddr,=20
struct ip_addr=20
*netmask,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
struct=20
ip_addr *gw,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
void (*=20
init)(struct netif=20
*netif),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; err_t =
(*=20
input)(struct pbuf *p, struct netif *netif))<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>2)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>In file =
/src/arch/ucosppc/sys_arch.c</FONT></DIV>
<DIV><FONT face=3DCourier>void sys_timeout(unsigned int msecs, =
sys_timeout_handler=20
h, void *data)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>In prototype declaration ..</FONT></DIV>
<DIV><FONT face=3DCourier>void sys_timeout(u16_t msecs, =
sys_timeout_handler h,=20
void *data);</FONT></DIV>
<DIV><FONT face=3DCourier></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier>3) In file</FONT></DIV>
<DIV><FONT face=3DCourier>"apps/httpd.c" line 116</FONT></DIV>
<DIV><FONT face=3DCourier>"apps/tcpecho.c" line 75</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>netbuf_data(buf, (void *)&amp;data,=20
&amp;len);</FONT></DIV>
<DIV><FONT face=3DCourier>Here len is  defined as static int len in =
httpd.c and=20
int in tcpecho.c</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>The prototype has len declared as =
u16_t</FONT></DIV>
<DIV><FONT=20
face=3DCourier>err_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
netbuf_data&nbsp;&nbsp;&nbsp;&nbsp; (struct netbuf=20
*buf,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
void **dataptr, u16_t *len);<BR></FONT></DIV>
<DIV><FONT face=3DCourier>4)</FONT></DIV>
<DIV><FONT face=3DCourier>"apps/httpd.c" line 149</FONT></DIV>
<DIV><FONT face=3DCourier>
<DIV><FONT face=3DCourier><FONT face=3DCourier>"apps/http_noapi.c"&nbsp; =
line=20
139</FONT></FONT></DIV>
<DIV></FONT><FONT face=3DCourier></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier>hexprint((u16_t *)&amp;stats, =
(u16_t)(sizeof(struct=20
stats) /=20
sizeof(u16_t)),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
statsbuf);<BR></FONT></DIV></DIV>
<DIV><FONT face=3DCourier>should be </FONT></DIV>
<DIV><FONT face=3DCourier><FONT face=3DCourier>hexprint((u16_t =
*)&amp;stats,=20
(u16_t)(sizeof(struct stats_) /=20
sizeof(u16_t)),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
statsbuf);</FONT></FONT></DIV>
<DIV><FONT face=3DCourier><FONT =
face=3DCourier></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier><FONT face=3DCourier>5)</FONT></FONT></DIV>
<DIV><FONT face=3DCourier>"../../src/netif/nullif.c", line 58: error =
(dcc:1554):=20
illegal type(s): ptr-to-func-ret-err_t '=3D' =
ptr-to-func-ret-int</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier>6)</FONT></DIV>
<DIV><FONT face=3DCourier>"../../src/engine/lib/netif.c", line 62: error =

(dcc:1554): illegal type(s): ptr-to-func-ret-err_t '=3D'=20
ptr-to-func-ret-void<BR></FONT></DIV>
<DIV><FONT face=3DCourier></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier><FONT =
face=3DCourier>Thanks</FONT></FONT></DIV>
<DIV><FONT face=3DCourier><FONT =
face=3DCourier>Ganesh</FONT></FONT></DIV>
<DIV><FONT face=3DCourier><FONT =
face=3DCourier>&nbsp;</DIV></FONT></FONT>
<DIV><FONT face=3DCourier><BR>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_00C9_01C16DFC.45DECCA0--



--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
        name="Wipro_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
        filename="Wipro_Disclaimer.txt"

-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its 
Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:address@hidden and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------

--------------InterScan_NT_MIME_Boundary--

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]