code:
const struct can_frame *cf = (struct can_frame *)skb->data;
Error:
dereferencing pointer to incomplete type
not sure why I gor this error any idea?
thanks
FB
the full code is:
/* Drop a given socketbuffer if it does not contain a valid CAN frame. */static inline int can_dropped_invalid_skb (struct net_device *dev, struct sk_buff *skb){ const struct can_frame *cf = (struct can_frame *)skb->data; if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) { kfree_skb(skb); dev->stats.tx_dropped++; return 1; } return 0;}
There is the same error here also:
dev->stats.tx_dropped++;
And this warning also:
'struct net_device' declared inside parameter list dev.h can_llvl 150 error/Sources/header/linux/can line 62 C/C++ Problem
Is it related?
regards