我想在 cppcheck 中使用多行抑制。 那可能吗? 例如: 我想改变
// cppcheck-suppress unusedFunction
int fn1(){
return 42;
}
// cppcheck-suppress unusedFunction
int fn2(){
}
// cppcheck-suppress unusedFunction
int fn3(){
}
int main(){
}
类似:
// cppcheck-suppress-start unusedFunction
int fn1(){
return 42;
}
int fn2(){
}
int fn3(){
}
// cppcheck-suppress-end unusedFunction
int main(){
}
最佳答案
没有;每the manual ,内联抑制没有“开始”/“结束”等效语法。
但是,还有其他方法可以设置抑制;例如,如果您想在整个源文件中使用 unusedFunction
,您可以在抑制文件中这样说。
请参阅上述链接手册中的第 6 章。
关于c++ - 使用 cppcheck 进行多行抑制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57325888/