PClint常见告警整理_20150710.xls

  1. 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
PClint常见告警整理_20150710.xls

问题 归类 PClint常见告警 错误类别 错误说明 C(编号) C++(编号) 简要说明 告警等级 语法错误 1-199 1001-1199 指的是一般编译器也会产生的语法错误 内部错误 200-299 是PC-Lint程序内部的错误,这类错误不会出现在代码中的 致命错误 300-399 指的是由于内存限制等导致的系统致命错误 告警(Warning) 400-699 1400-1699 出现的提示信息,是根据隐藏代码问题的可能性进行分类的: 其中编号400-699指的是被检查代码中很可能存在问题而产生的告警信息; 消息(Info.) 700-899 1700-1899 这些编号中出现的信息,产生错误的可能性相比告警信息来说级别要低,但仍然可能是因为代码问题导致的问题。 可选信息 (Elective Notes) 900-999 1900-1999 可选信息,他们不会被默认检查,除非你在选项中指定检查他们。 -w0?不产生信息(除了遇到致命的错误) -w1? 只生成错误信息 没有告警信息和其它提示信息 -w2?只有错误和告警信息 -w3?生成错误、告警和其它提示信息(这是默认设置) -w4?生成所有信息 编号 规则说明 示例/解决方案 Undeclared identifier Name -- Within an expression, an identifier was encountered that had not previously been declared and was not followed by a left parenthesis. Name is the name of the identifier. 例如: int a; a=b; error 40: (Error -- Undeclared identifier b)和error 550: (Warning -- Symbol a (line 8) not accessed) 可能使用空指针 Likely use of null pointer Symbol in [left/right] argument to operator String Reference svr = NULL; …… pthread_mutex_unlock(svr-lock); break; 已经将 svr 赋值为 NULL, 后面又使用了 svr 变量。 会导致空指针错误、而且未能正常释放锁。 Likely Access of out-of-bounds pointer 访问越界 int main() {char a[10]; a[10]=0; return 0;} 831:symbol a(line 3) not accessed.变量未被使用 访问超出范围的内存 Apparent access beyond array for function Symbol, argument Integer exceeds Integer Reference -- This message is issued for several library functions (such as fwrite, memcmp, etc.) wherein there is an apparent attempt to access more data than exist. For example, if the length of data specified in the fwrite call exceeds the size of the data specified. The function is specified by Symbol and the arguments are identified by argument number. See also Section 11.1 Function Mimicry (-function) and Section 11.2.1 Possible Semantics. error 420: (Warning -- Apparent access beyond array for function memcmp(const void *, const void *, unsigned int), argument 3 (size=21) exceeds argument 1 (size=20) [Reference: file D:\PC-Lint\MyTest\Test1\Test1.cpp: lines 9, 14]) error 420: (Warning -- Apparent access beyond

文档评论(0)

此项为空 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档