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

View: New views
3 Messages — Rating Filter:   Alert me  

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

by Simon Goldschmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.nongnu.org/bugs/?27851>

                 Summary: TCP_EVENT_RECV(pcb, NULL,...) results in
unreachable code warning
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Do 29 Okt 2009 18:08:03 GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release:
            lwIP version: 1.3.1

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27851>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

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

by Simon Goldschmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #1, bug #27851 (project lwip):

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

#define TCP_EVENT_RECV_CLOSED(pcb, ...)

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27851>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

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

by Simon Goldschmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27851 (project lwip):

                Category:                    None => TCP                    
                  Status:                    None => Fixed                  
             Assigned to:                    None => goldsimon              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #2:

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

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27851>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel