常见gcc编译警告整理【转】
来源:互联网 发布:网络中饼干是什么意思 编辑:程序博客网 时间:2024/04/29 04:54
1、warning: no newline at end of file
在文件最后一行加上回车键
解释:在《Rationale for the C99 standard》一文中,有C99的相关信息:
A backslash immediately before a newline has long been used to continue string literals, as well as preprocessing command lines. In the interest of easing machine generation of C, and of transporting code to machines with restrictive physical line lengths, the C89 Committee generalized this mechanism to permit any token to be continued by interposing a backslash/newline sequence.
c/c++代码的每一行后面有一个“结束符”,也就是newline。避免当被include的文件展开后,前一个文件的最后一行与后一个文件的第一行直接被连接成一行从而造成错误。
2、warning: comparison between pointer and integer
解释:integer与pointer比较
3、 warning: assignment discards qualifiers from pointer target type
解释:赋值时,取消了右值的限定。
4、 warning: passing argument 1 of 'send' makes pointer from integer without a cast
解释:函数send的第一个integer型参数没有强制转换为pointer型
5、warning: comparison is always true due to limited range of data type
解释:由于数据类型范围的限制,比较结果一直为真。
6、warning: initialization from incompatible pointer type
解释:不兼容指针类型的初始化
7、 warning: return makes pointer from integer without a cast
解释:return使integer转换为pointer,没有加强制类型转换。
8、warning: incompatible implicit declaration of built-in function 'printf'
解释:与内置的printf函数隐士声明不兼容。
9、warning: initialization discards qualifiers from pointer target type
解释:initialization取消了指针目标类型的限定。
10、warning: comparison is always false due to limited range of data type
由于类型限制,比较一直是假
11、warning: assignment from incompatible pointer type
不兼容的指针间赋值
12、warning: passing argument 1 of 'mes_read_time' discards qualifiers from pointer target type12、
mes_函数第一个参数的传递,丢弃了指针目标类型限定。
13、warning: "protocol_type" redefined
——type重定义
14、warning: 'return' with a value, in function returning void
在void返回类型的函数中,return返回值。
在文件最后一行加上回车键
解释:在《Rationale for the C99 standard》一文中,有C99的相关信息:
A backslash immediately before a newline has long been used to continue string literals, as well as preprocessing command lines. In the interest of easing machine generation of C, and of transporting code to machines with restrictive physical line lengths, the C89 Committee generalized this mechanism to permit any token to be continued by interposing a backslash/newline sequence.
c/c++代码的每一行后面有一个“结束符”,也就是newline。避免当被include的文件展开后,前一个文件的最后一行与后一个文件的第一行直接被连接成一行从而造成错误。
2、warning: comparison between pointer and integer
解释:integer与pointer比较
3、 warning: assignment discards qualifiers from pointer target type
解释:赋值时,取消了右值的限定。
4、 warning: passing argument 1 of 'send' makes pointer from integer without a cast
解释:函数send的第一个integer型参数没有强制转换为pointer型
5、warning: comparison is always true due to limited range of data type
解释:由于数据类型范围的限制,比较结果一直为真。
6、warning: initialization from incompatible pointer type
解释:不兼容指针类型的初始化
7、 warning: return makes pointer from integer without a cast
解释:return使integer转换为pointer,没有加强制类型转换。
8、warning: incompatible implicit declaration of built-in function 'printf'
解释:与内置的printf函数隐士声明不兼容。
9、warning: initialization discards qualifiers from pointer target type
解释:initialization取消了指针目标类型的限定。
10、warning: comparison is always false due to limited range of data type
由于类型限制,比较一直是假
11、warning: assignment from incompatible pointer type
不兼容的指针间赋值
12、warning: passing argument 1 of 'mes_read_time' discards qualifiers from pointer target type12、
mes_函数第一个参数的传递,丢弃了指针目标类型限定。
13、warning: "protocol_type" redefined
——type重定义
14、warning: 'return' with a value, in function returning void
在void返回类型的函数中,return返回值。
0 0
- 常见gcc编译警告整理【转】
- 常见gcc编译警告整理
- 常见gcc编译警告整理(开始)
- 常见gcc编译警告整理(开始)
- 常见gcc编译警告整理(开始)
- 常见gcc编译警告整理(开始)
- 常见gcc编译警告整理(开始)
- 常见gcc编译警告
- gcc 常见的编译错误,警告总结
- 常见gcc 编译错误整理(开始)
- gcc编译警告
- GCC 常见错误整理
- 常见gcc编译参数
- Keil的常见编译警告
- gcc编译错误整理
- Linux GCC编译警告:Clock skew detected.
- 不修改编译参数去除gcc警告
- 继续收集gcc一些编译警告
- Domino Cosole设置
- UITableView
- 第十三周项目4--(2)字符数组排序
- 1025. PAT Ranking (25)
- Spring获取ApplicationContext对象工具类
- 常见gcc编译警告整理【转】
- java 静态代理和动态代理详解
- 学习指针注意事项
- 第13周项目4-数组的排序(1)
- 合并两个有序链表
- paint
- 进程保护--CrossThreadFlags标志位
- Cocos2d-JS 清除tiled map的黑线
- App Store预览视频制作(App Previews)