-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refs #12021 - CI-windows.yml: fail build on compiler warnings / some cleanups #6982
Conversation
2794213
to
41600d0
Compare
0a6bcd5
to
1b0909f
Compare
@@ -288,9 +288,9 @@ void ResultsTree::setReportType(ReportType reportType) { | |||
if (!fileItem) | |||
continue; | |||
for (int j = 0; j < fileItem->rowCount(); ++j) { | |||
const auto& data = fileItem->child(j,0)->data().toMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there variable shadowing related to data
? If so, could we detect that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D:\a\cppcheck\cppcheck\gui\resultstree.cpp(291,32): warning C4458: declaration of 'data' hides class member [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj]
D:\a\cppcheck\Qt\5.15.2\msvc2019_64\include\QtWidgets/qwidget.h(747,18): message : see declaration of 'QWidget::data' (compiling source file D:\a\cppcheck\cppcheck\gui\resultstree.cpp) [D:\a\cppcheck\cppcheck\build\gui\cppcheck-gui.vcxproj]
Not something we can detect until the system header is included. Also I think that compilers have this covered.
I just had a look at enabling -Wshadow-field
for Clang but that warning has a wider scope.
No description provided.