首页 > 编程语言 > 详细

c语言warning总结

时间:2016-12-29 16:29:22      阅读:199      评论:0      收藏:0      [点我收藏+]

1、function declaration isn’t a prototype
括号中无参数,也要加void

2、array subscript is above array bounds
数组下标大于数组边界

例如:

#define LOCKNET_KEY_LEN 16

#define KEY_LEN 128

UINT8 signHex128[LOCKNET_KEY_LEN] = {0};
zCtrm_Bytes2String(signHex128+KEY_LEN-LOCKNET_KEY_LEN, signtext, LOCKNET_KEY_LEN);

通过看这个waring,看到代码里面的错误,不然这种越界还不知道什么时候就爆发了。

3、pointer targets in passing argument 3 of ‘mpi_read_string’ differ in signedness
第3个参数与‘mpi_read_string’函数中第三个参数类型不一致

4、pointer targets in assignment differ in signedness
参数不一致

5、passing argument 1 of ‘ConvertToBigEndian’ from incompatible pointer type
指针类型不一致

c语言warning总结

原文:http://www.cnblogs.com/wenqin/p/6233419.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!