buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27851, TCP_EVENT_RECV(pcb, NULL,...)...

 
 

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

bug #27851: TCP_EVENT_RECV(pcb, NULL,...) results in unreachable code warning

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Thu 29 Oct 2009 06:08:03 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.3.1

Sun 22 Nov 2009 04:19:10 PM UTC, comment #2:

Fixed by calling tcp_recv_null() when pcb->recv is NULL.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 29 Oct 2009 06:08:41 PM UTC, comment #1:

I'd add a new define for the NULL case:

#define TCP_EVENT_RECV_CLOSED(pcb, ...)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 29 Oct 2009 06:08:03 PM UTC, original submission:

From Iordan Neshev on lwip-devel (29-10-2009):

*line 337:
TCP_EVENT_RECV(pcb, NULL, ERR_OK, err);
A note may be added:
/* the NULL argument causes compiler warning (unreachable code)
that can be safely ignored */
I spent some time to find out why this happens. May be helpful
for somebody.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Submitted the item)
  •  

    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
    Sun 22 Nov 2009 04:19:10 PM UTCgoldsimonAssigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
      StatusNone=>Fixed
      CategoryNone=>TCP

    Back to the top


    Powered by Savane 3.1-cleanup1