CW 10   -  M54418TWR - linux:  compile error help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW 10   -  M54418TWR - linux:  compile error help

534 Views
francois_boucha
Contributor III

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

Labels (1)
0 Kudos
1 Reply

342 Views
francois_boucha
Contributor III

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

 

0 Kudos