From 621eae86b144462a1a822be5d4807cb9f6c057e7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 27 Apr 2015 11:28:28 -0600 Subject: [PATCH 1/2] Networking: If IPV6 is not enabled, an warning occurs for an unused variable, which is currently used inside the IPV6 block, but declared outside. From ObitalFox. --- net/socket/recvfrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c index 13d42061ac..3def0d1439 100644 --- a/net/socket/recvfrom.c +++ b/net/socket/recvfrom.c @@ -960,7 +960,6 @@ static inline void recvfrom_udpsender(struct net_driver_s *dev, struct recvfrom_ { FAR struct sockaddr_in *infrom = (FAR struct sockaddr_in *)pstate->rf_from; - FAR socklen_t *fromlen = pstate->rf_fromlen; if (infrom) { @@ -977,6 +976,7 @@ static inline void recvfrom_udpsender(struct net_driver_s *dev, struct recvfrom_ if (conn->domain == PF_INET6) { + FAR socklen_t *fromlen = pstate->rf_fromlen; in_addr_t ipv4addr; /* Encode the IPv4 address as an IPv4-mapped IPv6 address */ From cec90e144aa3fc49c892fa9cf89b19f3d5cc4258 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 27 Apr 2015 12:26:40 -0600 Subject: [PATCH 2/2] Another missing semicolon in a DEBUGASSERT statement --- drivers/usbhost/usbhost_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index 04ee1baafe..04dac59907 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -1605,7 +1605,7 @@ static FAR struct usbmsc_cbw_s *usbhost_cbwalloc(FAR struct usbhost_state_s *pri { FAR struct usbmsc_cbw_s *cbw = NULL; - DEBUGASSERT(priv->tbuffer && priv->tbuflen >= sizeof(struct usbmsc_cbw_s)) + DEBUGASSERT(priv->tbuffer && priv->tbuflen >= sizeof(struct usbmsc_cbw_s)); /* Initialize the CBW sructure */