编译内核时: [-Warray-bounds]

完整报错:

warning: 'memset' offset [17, 48] from the object at 'r6' is out of the bounds of referenced subobject 'rtmsg_dst' with type 'struct in6_addr' at offset 0 [-Warray-bounds]

导致编译终止。

 

解决方法1: 找到对应函数,把这个警告去掉。

解决方法2: 修改编译文件,将警告不作为错误处理,忽略这个警告。建议使用方法1

  scripts/gcc-wrapper.py

 

posted @ 2021-05-03 00:55  Dipsyhu  阅读(538)  评论(0编辑  收藏  举报