lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] (no subject)


From: franz keuner
Subject: [lwip-users] (no subject)
Date: Fri, 17 Dec 2004 12:35:53 +0100 (MET)

Hello,

I`m still at at loss with my pbuf problem.

I tried a lot of different lwIP configurations but the loop isnt`t
successfully executed.
Now the compliler gives at least some warnings:

\lwip\src\core\memp.c:
   116:           sizeof(struct memp)))];
W 196: constant expression out of range due to signed/unsigned type mismatch
   162:     size = MEM_ALIGN_SIZE(memp_sizes[i] + sizeof(struct memp));
W 196: constant expression out of range due to signed/unsigned type mismatch
Compiling c:\progate\scr_lwip\lwip\src\core\pbuf.c
\lwip\src\core\pbuf.c:
    78: static u8_t pbuf_pool_memory[(PBUF_POOL_SIZE *
MEM_ALIGN_SIZE(PBUF_POOL_BUFSIZE + sizeof(struct pbuf)))];
W 196: constant expression out of range due to signed/unsigned type mismatch
   309:     p = mem_malloc(MEM_ALIGN_SIZE(sizeof(struct pbuf) + offset) +
MEM_ALIGN_SIZE(length));
W 196: constant expression out of range due to signed/unsigned type mismatch

By "investigating" the behaviour of the iteration (complete sourcecode
listed below) 
I found out by printing some information in order to find out which
statements are executed (received with hyper terminal) that the command
 
p->next = (struct pbuf *)((u8_t *)p + PBUF_POOL_BUFSIZE + sizeof(struct
pbuf));

isn`t executed once.

If I`m trying to get some information about p_next (printf("p->next:
%x\n",p->next);) the programme also stops.

Regards and thanks,

Franz


 pbuf.c (line 112 et seqq)
 
  for(i = 0; i < PBUF_POOL_SIZE; ++i) {
    p->next = (struct pbuf *)((u8_t *)p + PBUF_POOL_BUFSIZE + sizeof(struct
pbuf));
    p->len = p->tot_len = PBUF_POOL_BUFSIZE;
    p->payload = MEM_ALIGN((void *)((u8_t *)p + sizeof(struct pbuf)));
    p->flags = PBUF_FLAG_POOL;
    q = p;
    p = p->next;
  }




-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!




reply via email to

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