]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Fixed unused variable warnings produced with the last commit
authorgoldsimon <goldsimon@gmx.de>
Thu, 1 Mar 2012 18:10:52 +0000 (19:10 +0100)
committergoldsimon <goldsimon@gmx.de>
Thu, 1 Mar 2012 18:10:52 +0000 (19:10 +0100)
src/api/api_lib.c
src/include/lwip/tcpip.h

index b2670d0208ddf8f9436298a763ce6ac8887a8bc9..244c4ecbbd87a8d6244c612098cc4490ba4500ca 100644 (file)
@@ -329,7 +329,7 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn)
   /* Let the stack know that we have accepted the connection. */
   msg.msg.conn = conn;
   /* don't care for the return value of do_recv */
-  TCPIP_APIMSG(&msg, do_recv, err);
+  TCPIP_APIMSG_NOERR(&msg, do_recv);
 #endif /* TCP_LISTEN_BACKLOG */
 
   *new_conn = newconn;
@@ -400,7 +400,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf)
         msg.msg.msg.r.len = 1;
       }
       /* don't care for the return value of do_recv */
-      TCPIP_APIMSG(&msg, do_recv, err);
+      TCPIP_APIMSG_NOERR(&msg, do_recv);
     }
 
     /* If we are closed, we indicate that we no longer wish to use the socket */
@@ -532,14 +532,13 @@ netconn_recved(struct netconn *conn, u32_t length)
   if ((conn != NULL) && (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) &&
       (netconn_get_noautorecved(conn))) {
     struct api_msg msg;
-    err_t err;
     /* Let the stack know that we have taken the data. */
     /* TODO: Speedup: Don't block and wait for the answer here
        (to prevent multiple thread-switches). */
     msg.msg.conn = conn;
     msg.msg.msg.r.len = length;
     /* don't care for the return value of do_recv */
-    TCPIP_APIMSG(&msg, do_recv, err);
+    TCPIP_APIMSG_NOERR(&msg, do_recv);
   }
 #else /* LWIP_TCP */
   LWIP_UNUSED_ARG(conn);
index d0509f56048b139d027c1cfaa42e085225c9ca92..04567f2c0f1df16c1a9df8e2018a2555a27d261d 100644 (file)
@@ -64,11 +64,14 @@ extern sys_mutex_t lock_tcpip_core;
 #else
 #define TCIP_APIMSG_SET_ERR(m, e)
 #endif
-#define TCPIP_APIMSG(m,f,e)   do { \
+#define TCPIP_APIMSG_NOERR(m,f) do { \
   TCIP_APIMSG_SET_ERR(m, ERR_VAL); \
   LOCK_TCPIP_CORE(); \
   f(&((m)->msg)); \
   UNLOCK_TCPIP_CORE(); \
+} while(0)
+#define TCPIP_APIMSG(m,f,e)   do { \
+  TCPIP_APIMSG_NOERR(m,f); \
   (e) = (m)->msg.err; \
 } while(0)
 #define TCPIP_APIMSG_ACK(m)
@@ -77,6 +80,7 @@ extern sys_mutex_t lock_tcpip_core;
 #else /* LWIP_TCPIP_CORE_LOCKING */
 #define LOCK_TCPIP_CORE()
 #define UNLOCK_TCPIP_CORE()
+#define TCPIP_APIMSG_NOERR(m,f) do { (m)->function = f; tcpip_apimsg(m); } while(0)
 #define TCPIP_APIMSG(m,f,e)   do { (m)->function = f; (e) = tcpip_apimsg(m); } while(0)
 #define TCPIP_APIMSG_ACK(m)   sys_sem_signal(&m->conn->op_completed)
 #define TCPIP_NETIFAPI(m)     tcpip_netifapi(m)