This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4f7745ae1c47958ab4273eb9d273c5c8f3067281
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Tue Aug 4 10:09:33 2020 +0900

    net/tcp/tcp_timer.c: Remove redundant assignments
    
    Found by clang-check:
    
    tcp/tcp_timer.c:185:15: warning: Value stored to 'result' is never read
                  result = tcp_callback(dev, conn, TCP_TIMEDOUT);
                  ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    tcp/tcp_timer.c:264:23: warning: Value stored to 'result' is never read
                          result = tcp_callback(dev, listener, TCP_TIMEDOUT);
                          ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    tcp/tcp_timer.c:300:19: warning: Value stored to 'result' is never read
                      result = tcp_callback(dev, conn, TCP_TIMEDOUT);
                      ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 warnings generated.
---
 net/tcp/tcp_timer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c
index d78d6ea..56e988d 100644
--- a/net/tcp/tcp_timer.c
+++ b/net/tcp/tcp_timer.c
@@ -182,7 +182,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct 
tcp_conn_s *conn,
 
               /* Notify upper layers about the timeout */
 
-              result = tcp_callback(dev, conn, TCP_TIMEDOUT);
+              tcp_callback(dev, conn, TCP_TIMEDOUT);
 
               ninfo("TCP state: TCP_CLOSED\n");
             }
@@ -261,7 +261,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct 
tcp_conn_s *conn,
                        * connection has timed out.
                        */
 
-                      result = tcp_callback(dev, listener, TCP_TIMEDOUT);
+                      tcp_callback(dev, listener, TCP_TIMEDOUT);
                     }
 
                   /* We also send a reset packet to the remote host. */
@@ -297,7 +297,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct 
tcp_conn_s *conn,
                    * timed out.
                    */
 
-                  result = tcp_callback(dev, conn, TCP_TIMEDOUT);
+                  tcp_callback(dev, conn, TCP_TIMEDOUT);
 
                   /* We also send a reset packet to the remote host. */
 

Reply via email to