CPPCHECK 报告"Redundant code: Found a statement that begins with numeric constant" 'using'声明
cppcheck reports "Redundant code: Found a statement that begins with numeric constant" for a 'using' statement
了解到这不是大量的上下文,我有这样一行:
using GridType = Grid<boost::optional<float>, 2>;
cppcheck说:
Redundant code: Found a statement that begins with numeric constant.
我会认为是"假阳性",但通常这些分析工具比我更聪明,所以我想看看是否有人能想到为什么分析器会这样解释这样的陈述?
我在Ubuntu系统上使用cppcheck 1.61。
cppcheck主要基于模式匹配,有时不太聪明/很肤浅。它确实发现了很多不错的东西,但也有很多错误。我认为这是一个错误的肯定,cppchecks简单的头脑被混淆了。
此外;1.61版本有点旧。你测试过最新的1.74吗?看看它在这里是否更聪明?(如果它不在您的发行版存储库中,那么从源代码构建非常简单)
相关文章:
- Problems with std::cin.fail()
- 应用程序崩溃并显示"symbol _ZdlPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference"
- 这对"With a stackless coroutine, only the top-level routine may be suspended."意味着什么
- Boost.TEST with CLion: "Test framework quit unexpectedly"
- 避免碎片化的ClientHellos with OpenSSL (DTLS)
- Issues with Win32 ReadProcessMemory API
- Qt with WinAPI MouseProc
- [[maybe_unused]] with structured_binding?
- Issue with WriteProcessMemory
- OpenCV RTP-Stream with FFMPEG
- "Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
- std::adjacent_difference with std::chrono time_point
- DLL Made with CMake 使程序崩溃
- QtCreator with C 库中的链接器问题
- SHBrowseForFolder with BIF_BROWSEFORCOMPUTER and SHGetPathFr
- specialized std::default_delete with QQmlComponent
- VS2019 - Sudo Remote Debugging on Linux with Cmake project
- Inference pytorch C++ with alexnet and cv::imread image
- CPPCHECK 查找宏的查找"redundant code: found a statement that begins with numeric constant"
- CPPCHECK 报告"Redundant code: Found a statement that begins with numeric constant" 'using'声明