LinuxSplint使用简介PPT课件

上传人:新** 文档编号:578881647 上传时间:2024-08-25 格式:PPT 页数:12 大小:1.48MB
返回 下载 相关 举报
LinuxSplint使用简介PPT课件_第1页
第1页 / 共12页
LinuxSplint使用简介PPT课件_第2页
第2页 / 共12页
LinuxSplint使用简介PPT课件_第3页
第3页 / 共12页
LinuxSplint使用简介PPT课件_第4页
第4页 / 共12页
LinuxSplint使用简介PPT课件_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《LinuxSplint使用简介PPT课件》由会员分享,可在线阅读,更多相关《LinuxSplint使用简介PPT课件(12页珍藏版)》请在金锄头文库上搜索。

1、Linux Splint 使用简介GDLC2012.02.091安装Download到splint的官方网站下载最新的源代码,解压缩源代码.#tar xzf splint-xxx-tar.gzBuild & Install去到解压缩后的源代码目录中,执行#./configure -prefix=/usr/local/splint#make#make installModify env# vi /.bashrc添加:export LARCH_PATH=/usr/local/splint/share/splint/libexport LCLIMPORTDIR=/usr/local/splint/s

2、hare/splint/import2检测范围3null dereferences 例子4undefined values 例子5Type类型检查例子6memory management 例子7memory management 例子8memory boundary 例子9splint 批注相关功能More powerful checks are made possible by additional information given in source code annotations. Annotations are stylizedcomments that document assu

3、mptions about functions, variables, parameters and types. In addition to the checks specifically enabled by annotations, many of the traditional lint checks are improved by exploiting this additional information.通过批注可以模拟C+的某些访问特性控制,也能加强对程序执行路径的管理。目前不建议在我们工程中应用,因为需要修改源代码。10splint 的LCL规范splint程序依据LCL语

4、言写的规范模板,去解释分析C语言程序。splint安装后,就默认有很多的LCL模板,多数的检查都使用默认的模板,没有定制添加新的模板。11splint 使用#splint -I$header_path +trytorecover -D_signed_=char -mustdefine -unrecog -paramuse +gnu-extensions +posixlib +never-include -nullpass-I 包含目录-D定义一些系统不认得的关键字以下flag如果被使用,前面的+表示检查,-表示不检查。mustdefined使用前必须定义unrecog 不认得的标识符paramuse 定义了变量需要使用gnu-extentions 应用GNU扩展模式posixlib 应用posix库never-include 不包含头文件nullpass 放行空指针12

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号