Skip to content

Conversation

@firewave
Copy link
Collaborator

No description provided.

@firewave firewave force-pushed the vs-warn branch 3 times, most recently from 2794213 to 41600d0 Compare October 31, 2024 15:15
@firewave firewave changed the title CI-windows.yml: fail build on compiler warnings CI-windows.yml: fail build on compiler warnings / some cleanups Oct 31, 2024
@firewave firewave force-pushed the vs-warn branch 3 times, most recently from 0a6bcd5 to 1b0909f Compare October 31, 2024 15:45
@firewave firewave marked this pull request as ready for review October 31, 2024 15:55
@firewave firewave changed the title CI-windows.yml: fail build on compiler warnings / some cleanups refs #12021 - CI-windows.yml: fail build on compiler warnings / some cleanups Oct 31, 2024
if (!fileItem)
continue;
for (int j = 0; j < fileItem->rowCount(); ++j) {
const auto& data = fileItem->child(j,0)->data().toMap();
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@chrchr-github chrchr-github merged commit 14400be into danmar:main Oct 31, 2024
@firewave firewave deleted the vs-warn branch October 31, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants