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

Submitted by:  Leon Woestenberg <likewise>
Submitted on:  Sat 15 Nov 2003 12:24:31 AM UTC  
 
Category: TCPSeverity: 1,5
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: Leon Woestenberg <likewise>
Open/Closed: ClosedPlanned 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>
Project 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>
Project MemberIn charge of this item.

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 01 Jun 2006 07:12:09 PM UTCerikcorryAttached File-=>Added aliasing.diff, #10102
Thu 29 Apr 2004 12:05:28 AM UTClikewiseStatusNone=>Fixed
  Assigned toNone=>likewise
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1