MISRA C Rule8.5 3447 3451 Rule8.6 0630
变量被声明为具有外部链接属性,但声明不是在头文件中 ;
全局标识符在多个文件中被声明 ;
多次定义了对象(外部链接)。
工具/原料
Rule8.5 3447 3451 Rule8.6 0630
MISRA C:2012
Rule8.5 3447
3447 '%s' is being declared with external linkage but this declaration is not in a header file.
对象或函数被声明为具有 外部链接 属性,然而这个声明并不是在头文件中进行的。
一个具有外部链接属性的对象,暗示它会被多个 翻译单元访问。
为了确保定义和用法的一致性,通常首先在头文件中声明对象,然后在要定义或使用这个对象的每一个翻译单元中都包含这个头文件。Rule8.5 3451
阅读量:45
阅读量:87
阅读量:33
阅读量:59
阅读量:125

