__packed struct SPacketQueue
{
struct SPacketQueue *pNext;
struct SPacketQueue *pPre;
DWORD Seq; /* sequence of this packet */
struct SMemHead *MemHead; /* packet store in MemHead' playload */
};
/* tcb (transmit control block). used to keep tcp state
information */
__packed struct STCB
{
struct STCB *pNext; /* Next Node */
BYTE TCPState;
WORD PortScr;
WORD PortDest;
IP_ADDR IPScr;
IP_ADDR IPDest;
DWORD SeqMine;
struct SPacketQueue *QUnacked;
};
上面是定义的结构体,函数如下:
void TCPRelease(struct STCB *pTCB)
{
struct SPacketQueue *pQ;
/* reclaim Q, and free packet in queue */
while(pQ = TCPOutQ(&(pTCB->QUnacked)))
MemFree(pQ->MemHead);
}
这个函数里面报错 error: #167: argument of type "struct SPacketQueue *__packed *" is incompatible with parameter of type "struct SPacketQueue **"
如果去掉 __packed struct STCB前面的__packed ,就不报错,请问各位大侠,这是什么毛病,我想所有的参数都对其。 |