编译Bug汇总

1,member access within misaligned address 0x000000000031 for type 'struct ListNode', which requires 8 byte alignment

链表尾没有指向空

2,Line 14: index -127 out of bounds for type 'int [128]'

自己尝忽视的,当取字符作为key建表时,循环条件应为while(*p)

3,member access within null pointer of type 'struct ListNode'

compiler不知道你的所谓的head->next是不是NULL,所以你要在每一步这种情况的时候都要先声明if(head->next != NULL) 虽然这样感觉很麻烦,仔细想想为了所谓的安全起见必须要这样做。

 

posted on 2018-03-10 11:44  米兰达莫西  阅读(288)  评论(0编辑  收藏  举报