patchlwIP - A Lightweight TCP/IP stack - Patches: patch #5449, Remove warnings & errors ->...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5449: Remove warnings & errors -> ANSIC compatibility

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Tue 10 Oct 2006 08:02:27 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Mon 27 Nov 2006 03:49:39 PM UTC, comment #2: 

Found PACK_STRUCT_FIELD in contrib/ports/unix/include/arch/cc.h to trigger these warnings.

Christiaan Simons <christiaans>
Group Member
Mon 16 Oct 2006 02:58:22 PM UTC, comment #1: 

Found more warnings on a bleeding edge Gentoo box with a bleeding edge GCC 4.1.1, I'm going to investiagate this a bit further.

Also think there are some portability thingies that may require the introduction of autoconf (if only for the Unix port) to solve these cleanly. Sadly I've fot little experience with autoconf so I'll have to study it before using it.

Christiaan Simons <christiaans>
Group Member
Tue 10 Oct 2006 08:02:27 AM UTC, original submission:  

changes to comply to ANSI C: (note i did not change ppp & ipv6 directories, nor inet6.c, loopif.c or slipif.c

1. sys.h:   renamed (struct sys_timeout) to (struct _sys_timeout) to avoid name-conflict with function sys_timeout().
2. tcp.h:   line 157: define TCP_OOSEQ_TIMEOUT as 6U instead of 6 only, to avoid signed/unsigned issue in tcp.c at line 564

3. api_lib.c:  lines 492, 535 & 580: use (void*) cast instead of (void**) to comply with GCC -fstrict-aliasing
4. sockets.c:  line 94 signed/unsigned compare

5. mem.c:   added MEM_ALIGN() macro where (u8_t*) is convertet to (struct mem*) (too many lines to mention)
            line 214: signed/unsigned issue
6. memp.c:  lines 67 & 98: renamed (struct sys_timeout) to (struct _sys_timeout) to avoid name-conflict with function sys_timeout().
            lines 145 & 214: added MEM_ALIGN() macro where (u8_t*) is convertet to (struct memp*)
7. pbuf.c:  line 113: added MEM_ALIGN() / MEM_ALIGN_SIZE()
        !!!!!!!!!!line 590!!!!!
8. stats.c: lines 87-90: changed printf-format from S16_F to MEM_SIZE_F
9. sys.c:   renamed (struct sys_timeout) to (struct _sys_timeout) to avoid name-conflict with function sys_timeout().
10. tcp.c:   line 171: included all enum values as case, even if they are not explicitly used (fall-through to default) (-Wswitch / Wswitch-enum)
11. tcp_in.c:  line 606: included all enum values as case, even if they are not explicitly used (fall-through to default) (-Wswitch / Wswitch-enum)
12. ip.c:   lines 307/319: changed snmp_inc_ipunknownprotos() to snmp_inc_ipinunknownprotos() (snmp implementation change)
13. ip_frag.c: line 232: signed/unsigned issue

14. etharp.c:   line 47: include <string.h>
               line 369: declare i as int, k as u8_t (was s8_t for both)
               line 448: declare i as int
               line 750: declare i as int

Simon Goldschmidt <goldsimon>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10937:  ANSIC.patch added by goldsimon (15KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by christiaans (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-11-27 christiaans StatusNone Done
        Open/ClosedOpen Closed
    2006-10-10 goldsimon Attached File- Added ANSIC.patch, #10937

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code