Chinaunix首页 | 论坛 | 博客

  • 博客访问: 206329
  • 博文数量: 51
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 502
  • 用 户 组: 普通用户
  • 注册时间: 2013-04-05 08:43
个人简介

无知者无最

文章分类

全部博文(51)

文章存档

2016年(1)

2015年(3)

2014年(33)

2013年(14)

我的朋友

分类: C/C++

2013-12-31 15:03:41

1. warning: function declaration isn't a prototype(原型)
1. 函数没有声明。在你调用的这个函数前面加上该函数的定义即可;
2. 没有参数的函数括号里面没有加void就会出现此警告。
2. implicit declaration of function
1  没有把函数所在的c文件生成.o目标文件
2  在函数所在的c文件中定义了,但是没有在与之相关联的.h文件中声明
3、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的文件展开后,前一个文件的最后一行与后一个文件的第一行直接被连接成一行从而造成错误。

4、warning: comparison between pointer and integer    
        解释:integer与pointer比较

5、 warning: assignment discards qualifiers from pointer target type
        解释:赋值时,取消了右值的限定。
6、 warning: passing argument 1 of 'send' makes pointer from integer without a cast
        解释:函数send的第一个integer型参数没有强制转换为pointer型
7、warning: comparison is always true due to limited range of data type
        解释:由于数据类型范围的限制,比较结果一直为真。

8、warning: initialization from incompatible pointer type
        解释:不兼容指针类型的初始化
9、 warning: return makes pointer from integer without a cast
        解释:return使integer转换为pointer,没有加强制类型转换。
10、warning: incompatible implicit declaration of built-in function 'printf'
        解释:与内置的printf函数隐士声明不兼容。
11、warning: initialization discards qualifiers from pointer target type
        解释:initialization取消了指针目标类型的限定。
12、warning: comparison is always false due to limited range of data type
        解释:由于类型限制,比较一直是假
13、warning: assignment from incompatible pointer type    
        解释:不兼容的指针间赋值



阅读(908) | 评论(0) | 转发(0) |
0

上一篇:GIF图形文件格式文档

下一篇:C语言之位域

给主人留下些什么吧!~~