buglwIP - A Lightweight TCP/IP stack - Bugs: bug #6564, src/core/tcp.c:139: warning:...

 
 

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

bug #6564: src/core/tcp.c:139: warning: dereferencing type-punned pointer will break strict-aliasing rules

Submitter:  Leon Woestenberg <likewise>
Submitted:  Sat 15 Nov 2003 12:24:31 AM UTC
   
 
Category:  TCP Severity:  1,5
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  likewise
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Thu 01 Jun 2006 07:12:09 PM UTC, comment #2: 

I fixed this by altering the code so the -fno-strictaliasing option doesn't need to be used.  See attached patch.

Erik Corry <erikcorry>
Thu 27 Nov 2003 04:34:59 PM UTC, comment #1: 

I think th e -fno-strictaliasing option must be used to silence these warnings in gcc 3.3.X

Jani Monoses <jani>
Group Member
Sat 15 Nov 2003 12:24:31 AM UTC, original submission:  

err_t
tcp_close(struct tcp_pcb *pcb)
{
  err_t err;

#if TCP_DEBUG
  LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in state "));
  tcp_debug_print_state(pcb->state);
  LWIP_DEBUGF(TCP_DEBUG, ("\n"));
#endif /* TCP_DEBUG */
  switch (pcb->state) {
  case LISTEN:
    err = ERR_OK;
    tcp_pcb_remove((struct tcp_pcb **)&tcp_listen_pcbs, pcb);

Leon Woestenberg <likewise>
Group Member

 

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

Attached Files
file #10102:  aliasing.diff added by erikcorry (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-06-01 erikcorry Attached File- Added aliasing.diff, #10102
2004-04-29 likewise StatusNone Fixed
    Assigned toNone likewise
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code