You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2022/01/03 11:52:58 UTC

[incubator-nuttx] 01/03: net/can/can_recvmsg.c: fix warning

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

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

commit 649619b8f81a9d06d0f889ca1448680fc2f678c5
Author: raiden00pl <ra...@railab.me>
AuthorDate: Thu Dec 30 09:53:38 2021 +0100

    net/can/can_recvmsg.c: fix warning
---
 net/can/can_recvmsg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/can/can_recvmsg.c b/net/can/can_recvmsg.c
index 36bacae..540f19e 100644
--- a/net/can/can_recvmsg.c
+++ b/net/can/can_recvmsg.c
@@ -410,7 +410,10 @@ static uint16_t can_recvfrom_eventhandler(FAR struct net_driver_s *dev,
                                           FAR void *pvpriv, uint16_t flags)
 {
   struct can_recvfrom_s *pstate = (struct can_recvfrom_s *)pvpriv;
+#if defined(CONFIG_NET_CANPROTO_OPTIONS) || defined(CONFIG_NET_CAN_CANFD) || \
+  defined(CONFIG_NET_TIMESTAMP)
   struct can_conn_s *conn = (struct can_conn_s *)pstate->pr_sock->s_conn;
+#endif
 
   /* 'priv' might be null in some race conditions (?) */