[En-Nut-Discussion] ipout.c error

Thiago A. Corrêa thiago.correa at gmail.com
Mon Dec 27 19:16:01 CET 2010


Hi,

On Mon, Dec 27, 2010 at 2:01 PM, Stefan Profanter <stefan at profanter.me> wrote:
>> e:/ethernut-4.8.8/nut/net/ipout.c:227:29: error: operation on 'nif->if_pkt_id' may be undefined
>> e:/ethernut-4.8.8/nut/net/ipout.c:256:17: error: operation on 'nif->if_pkt_id' may be undefined
>
> Hi!
> I had the same problem.
> I've changed the lines
>
> ...
> nif->if_pkt_id++;
> ...
>
> To
>
> ...
> uint16_t buf = nif->if_pkt_id;
> nif->if_pkt_id = buf +1;
> ...
>
> There is a problem with the '++' operator which isn't defined on the datatype of nif->if_pkt_id.
> I don't know why.

On first sight, looks like a compiler bug to me. Which compiler are you using?

Any reason for it not to work as:
nif->if_pkt_id = nif->if_pkt_id +1;

?

Kind Regards,
    Thiago A. Correa



More information about the En-Nut-Discussion mailing list