CW 10   -  M54418TWR - linux:  compile error help

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CW 10   -  M54418TWR - linux:  compile error help

608件の閲覧回数
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

ラベル(1)
タグ(1)
0 件の賞賛
1 返信

416件の閲覧回数
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 件の賞賛