揭开PC-Lint9的神秘面纱
一、下载
二、揭开PC-Lint9的神秘面纱
PC-lint for C/C++ (NT) Vers. 9.00a, Copyright Gimpel Software 1985-2008
三、升级到最新版本
D:\PC-Lint9>PATCH.EXE LP9-A-B.RTP
D:\PC-Lint9>PATCH.EXE LP9-B-C.RTP
D:\PC-Lint9>PATCH.EXE LP9-C-D.RTP
D:\PC-Lint9>PATCH.EXE LP9-D-E.RTP
D:\PC-Lint9>PATCH.EXE LP9-E-F.RTP
D:\PC-Lint9>
D:\PC-Lint9>
D:\PC-Lint9>lint-nt -v
PC-lint for C/C++ (NT) Vers. 9.00f, Copyright Gimpel Software 1985-2010
四、在线试用
五、若干例子
co-msc90.lnt
-i"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"
class X
{
int *p;
public:
X()
{ p = new int[20]; }
void init()
{ memset( p, 20, 'a' ); }
~X()
{ delete p; }
};
PC-lint for C/C++ (NT) Vers. 9.00f, Copyright Gimpel Software 1985-2010
--- Module: simple.cpp (C++)
_
{ p = new int[20]; }
simple.cpp(8) : Info 1732: new in constructor for class 'X' which has no
assignment operator
simple.cpp(8) : Info 1733: new in constructor for class 'X' which has no copy
constructor
_
{ memset( p, 20, 'a' ); }
simple.cpp(10) : Warning 669: Possible data overrun for function 'memset(void
*, int, unsigned int)', argument 3 (size=97) exceeds argument 1 (size=80)
[Reference: file simple.cpp: lines 8, 10]
simple.cpp(8) : Info 831: Reference cited in prior message
simple.cpp(10) : Info 831: Reference cited in prior message
_
{ delete p; }
simple.cpp(12) : Warning 424: Inappropriate deallocation (delete) for 'new[]'
data
--- Wrap-up for Module: simple.cpp
Info 753: local class 'X' (line 3, file simple.cpp) not referenced
simple.cpp(3) : Info 830: Location cited in prior message
--- Global Wrap-up
Info 1714: Member function 'X::init(void)' (line 9, file simple.cpp) not
referenced
simple.cpp(9) : Info 830: Location cited in prior message
PC-lint for C/C++ (NT) Vers. 9.00f, Copyright Gimpel Software 1985-2010
--- Module: a.cpp (C++)
--- Module: b.cpp (C++)
_
int b = a;
b.cpp(3) : Warning 1544: Value of variable 'a' (line 4, file a.cpp)
indeterminate (order of initialization)
a.cpp(4) : Info 830: Location cited in prior message
--- Global Wrap-up
PC-lint for C/C++ (NT) Vers. 8.00w, Copyright Gimpel Software 1985-2007
--- Module: multi-threading.cpp (C++)
_
//lint -sem( reader, thread )
multi-threading.cpp 6 Warning 425: 'unrecognized name' in processing semantic
'thread' at token 'thread'
_
//lint -sem( Lock::Lock, thread_lock )
multi-threading.cpp 7 Warning 425: 'unrecognized name' in processing semantic
'thread_lock' at token 'thread_lock'
_
//lint -sem( Lock::~Lock, thread_unlock )
multi-threading.cpp 8 Warning 425: 'unrecognized name' in processing semantic
'thread_unlock' at token 'thread_unlock'
D:\Projects\Lab\PC-lint9-test\tests>
D:\Projects\Lab\PC-lint9-test\tests>
D:\Projects\Lab\PC-lint9-test\tests>set path=D:\Tools\CMD\Lint\SmartLint\PC-Lint9.0
D:\Projects\Lab\PC-lint9-test\tests>lint-nt multi-threading.cpp
PC-lint for C/C++ (NT) Vers. 9.00f, Copyright Gimpel Software 1985-2010
--- Module: multi-threading.cpp (C++)
--- Thread messages:
Warning 457: Function 'h(void)' of thread 'main(void)' has an unprotected write
access to variable 'x' which is used by function 'h(void)' of thread
'reader(void)'
Warning 458: Function 'h(void)' of thread 'main(void)' has an unprotected read
access to variable 'y' which is modified by function 'g(void)' of thread
'reader(void)'
六、辅助工具
七、PC-Lint9.0新增功能
6、“宏净化(Macro Scavenging)”。这个功能想必是为了解决PC-Lint与GCC不同版本配合中需要大量人工配置的尴尬局面吧。听起来不错的一个解决方案,具有较强的通用性。
7、新加入的“-sem”语法:成员方法的初始化/回收职能标识、inout类参数标识、多线程分析辅助标识…… 这一系列补充标识都是非常有实用价值的,尤其是前两项,解决了C++工程维护中扩充成员时经常碰到的忘记写配套的初始化或释放处理的顽疾。
八、参考资料
揭开PC-Lint9的神秘面纱相关推荐
- @程序员,为你揭开直播技术的神秘面纱!
作者 | 阿文,责编 | 郭芮 头图 | CSDN 下载自视觉中国 出品 | CSDN(ID:CSDNnews) 随着Web 2.0 的普及以及移动互联网技术的发展,各种视频分享.流媒体直播类型的服务 ...
- 揭开人类语言的神秘面纱:从理解到处理自然语言
https://www.toutiao.com/a6709740042509615619/ 随着人工智能的进步和技术变得越来越复杂,我们希望现有的概念能够接受这种变化或者改变自己.同样,在自然语言的计 ...
- 揭开webRTC媒体服务器的神秘面纱——WebRTC媒体服务器开源项目介绍
揭开webRTC媒体服务器的神秘面纱--WebRTC媒体服务器&开源项目介绍 WebRTC生态系统是非常庞大的.当我第一次尝试理解WebRTC时,网络资源之多让人难以置信.本文针对webRTC ...
- 揭开Java 泛型类型擦除神秘面纱
转载自 揭开Java 泛型类型擦除神秘面纱 泛型,一个孤独的守门者. 大家可能会有疑问,我为什么叫做泛型是一个守门者.这其实是我个人的看法而已,我的意思是说泛型没有其看起来那么深不可测,它并不神秘 ...
- .net单点登录demo_图文并茂,为你揭开“单点登录“的神秘面纱
本文首发于政采云前端团队博客:图文并茂,为你揭开"单点登录"的神秘面纱 https://www.zoo.team/article/sso 概念 单点登录( Single Sign ...
- 小编带你一起揭开DLL木马的神秘面纱(转)
在这个万"马"奔腾的时代,网络上充斥着各种各样的木马,不过随着杀毒技术的进步和大家防毒意识的提高,传统木马已渐渐失去市场,而DLL木马则"与时俱进"以其强大的生 ...
- 【第3期】量化大咖来了!揭开量化对冲的神秘面纱
阅读原文:http://club.jr.jd.com/quant/topic/1368799 京东金融官方资讯QQ群:456448095 有什么想咨询的都可以来询问我们 我们期待已久的第3位量化大咖来 ...
- 揭开均线系统的神秘面纱_揭开依赖注入的神秘面纱,并通过此快速介绍了解它的实际应用...
揭开均线系统的神秘面纱 by Sankalp Bhatia 通过Sankalp Bhatia 揭开依赖注入的神秘面纱,并通过此快速介绍了解它的实际应用 (Demystify Dependency In ...
- 揭开均线系统的神秘面纱_在应用程式审查API中揭开新玩法的神秘面纱
揭开均线系统的神秘面纱 During the #11WeeksOfAndroid the new Play In-App Review API was announced. This was a lo ...
- html5实现单点登录,图文并茂,为你揭开“单点登录“的神秘面纱
概念 单点登录( Single Sign On ,简称 SSO),是目前比较流行的企业业务整合的解决方案之一,用于多个应用系统间,用户只需要登录一次就可以访问所有相互信任的应用系统. 前置介绍 同源策 ...
最新文章
- MySQL数据库使用连接更新表中某个字段数据
- LaTeX文档插入图片的几种常用方法
- 第一行代码学习笔记第八章——运用手机多媒体
- 牛客 - 阶乘(唯一分解定理)
- 静态html引入js添加随机数后缀防止缓存
- window server2008 r2
- jep290涉及jdk版本_JDK 14 – JEP 361从预览中切换表达式
- c语言bfs程序讲解,面试算法--二叉树DFS/BFS实现(C语言)
- GCC中的弱符号与强符号
- WinForm 快捷键设置
- ServHa双机热备简单配置
- 如何向Mac Dictionary App添加其他语言
- k8s部署jenkins
- 【提问】iOS UIAtumator 是怎么判断元素isVisible的?
- 问题解决办法:pip tensorrt成功,PyCharm import出错
- javase和java区别_javase和java有什么区别
- hr面试性格测试30题_网友应聘华为表现优秀,最终却挂在性格测试上,看真题我哭……...
- java excel公式计算_java中Excel公式的计算和函数,实例展示
- Sql语句区分中英文
- 拆书帮便签读书法,重新定义高效阅读
热门文章
- vue获取麦克风_vue使用recorder.js实现录音功能
- 使用 json-server 作为 mock 数据
- 你了解node多进程吗
- 导出一条数据_来自小师弟的灵魂拷问之数据泵导出丢失的那些数据量去哪了?...
- qt 获取用户缩放_Qt-如何创建随窗口缩放并保持纵横比的图像?
- 腾讯云服务器CentOs7系统发布个人网站
- 20190824:(leetcode习题)报数
- 简述python3默认使用的编码标准_Python3.X默认使用的编码是
- ajax 实时进度_【乐建工程宝】如何把控施工项目进度
- vb中SendMessage函数