[kmymoney] [Bug 495204] New: huge number of build warnings: declaration of ‘value’ shadows a member of ‘MyMoneyKeyValueContainer’ [-Wshadow]
Ralf Habacker
bugzilla_noreply at kde.org
Tue Oct 22 19:37:38 BST 2024
https://bugs.kde.org/show_bug.cgi?id=495204
Bug ID: 495204
Summary: huge number of build warnings: declaration of ‘value’
shadows a member of ‘MyMoneyKeyValueContainer’
[-Wshadow]
Classification: Applications
Product: kmymoney
Version: git (master)
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: buildsystem
Assignee: kmymoney-devel at kde.org
Reporter: ralf.habacker at freenet.de
Target Milestone: ---
STEPS TO REPRODUCE
1. build kmymoney from master branch with g++ version 7.5
2. inspect build log
OBSERVED RESULT
There are tons of messages like this:
cd /home/xxx/src/kmymoney-2-build/kmymoney/mymoney && /usr/bin/ccache
/usr/bin/c++ -DKCOREADDONS_LIB -DKF_DEPRECATED_WARNINGS_SINCE=0x60000
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x56200C -DQT_CORE_LIB -DQT_DBUS_LIB
-DQT_DEPRECATED_WARNINGS_SINCE=0x60000 -DQT_DISABLE_DEPRECATED_BEFORE=0x50f02
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_KEYWORDS
-DQT_NO_URL_CAST_FROM_STRING -DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB
-DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DQT_USE_QSTRINGBUILDER
-DQT_WEBCHANNEL_LIB -DQT_WEBENGINECORE_LIB -DQT_WEBENGINEWIDGETS_LIB
-DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-Dkmm_mymoney_EXPORTS -I/home/xxx/src/kmymoney-2-build/kmymoney/mymoney
-I/home/xxx/src/kmymoney-2/kmymoney/mymoney
-I/home/xxx/src/kmymoney-2-build/kmymoney/mymoney/kmm_mymoney_autogen/include
-I/home/xxx/src/kmymoney-2 -I/home/xxx/src/kmymoney-2-build
-I/home/xxx/src/kmymoney-2/kmymoney -I/home/xxx/src/kmymoney-2-build/kmymoney
-I/home/xxx/src/kmymoney-2/kmymoney/settings
-I/home/xxx/src/kmymoney-2-build/kmymoney/settings
-I/home/xxx/src/kmymoney-2-build/kmymoney/dialogs
-I/home/xxx/src/kmymoney-2/kmymoney/widgets
-I/home/xxx/src/kmymoney-2-build/kmymoney/widgets
-I/home/xxx/src/kmymoney-2/kmymoney/mymoney/storage
-I/home/xxx/src/kmymoney-2/kmymoney/interfaces
-I/home/xxx/src/kmymoney-2-build/kmymoney/interfaces
-I/home/xxx/src/kmymoney-2/kmymoney/plugins
-I/home/xxx/src/kmymoney-2-build/kmymoney/plugins
-I/home/xxx/src/kmymoney-2/kmymoney/views
-I/home/xxx/src/kmymoney-2/kmymoney/dialogs
-I/home/xxx/src/kmymoney-2/kmymoney/converter
-I/home/xxx/src/kmymoney-2-build/kmymoney/dialogs/settings
-I/home/xxx/src/kmymoney-2-build/kmymoney/mymoney/storage
-I/home/xxx/src/kmymoney-2/kmymoney/wizards/endingbalancedlg
-I/home/xxx/src/kmymoney-2-build/kmymoney/wizards/endingbalancedlg
-I/home/xxx/src/kmymoney-2/kmymoney/wizards/newinvestmentwizard
-I/home/xxx/src/kmymoney-2-build/kmymoney/wizards/newinvestmentwizard
-I/home/xxx/src/kmymoney-2/kmymoney/wizards/newloanwizard
-I/home/xxx/src/kmymoney-2-build/kmymoney/wizards/newloanwizard
-I/home/xxx/src/kmymoney-2/kmymoney/wizards/wizardpages
-I/home/xxx/src/kmymoney-2/kmymoney/models
-I/home/xxx/src/kmymoney-2-build/kmymoney/models
-I/home/xxx/src/kmymoney-2/kmymoney/icons
-I/home/xxx/src/kmymoney-2-build/kmymoney/icons
-I/home/xxx/src/kmymoney-2/kmymoney/menus
-I/home/xxx/src/kmymoney-2-build/kmymoney/menus
-I/home/xxx/src/kmymoney-2/kmymoney/misc
-I/home/xxx/src/kmymoney-2-build/kmymoney/misc
-I/home/xxx/src/kmymoney-2-build/kmymoney/mymoney/payeeidentifier
-I/home/xxx/src/kmymoney-2/kmymoney/mymoney/payeeidentifier
-I/home/xxx/src/kmymoney-2-build/kmymoney/plugins/onlinetasks/interfaces
-I/home/xxx/src/kmymoney-2/kmymoney/plugins/onlinetasks/interfaces -isystem
/usr/include/qt5 -isystem /usr/include/qt5/QtXml -isystem
/usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem
/usr/include/qt5/QtGui -isystem /usr/include/KF5/KService -isystem
/usr/include/KF5 -isystem /usr/include/KF5/KConfig -isystem
/usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KCoreAddons -isystem
/usr/include/KF5/KI18n -isystem /usr/include/KF5/KItemModels -isystem
/home/xxx/src/alkimia-qt5-install/usr/include/alkimia/Qt5 -isystem
/home/xxx/src/alkimia-qt5-install/usr/include -isystem
/usr/include/qt5/QtWebEngineWidgets -isystem /usr/include/qt5/QtWebEngineCore
-isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQmlModels
-isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem
/usr/include/qt5/QtWebChannel -isystem /usr/include/qt5/QtPositioning -isystem
/usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtWidgets -isystem
/usr/include/KF5/KXmlGui -isystem /usr/include/KF5/KConfigWidgets -isystem
/usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem
/usr/include/KF5/KCodecs -isystem /usr/include/KF5/KAuthWidgets -isystem
/usr/include/KF5/KAuthCore -isystem /usr/include/KF5/KAuth -isystem
/usr/include/qt5/QtDBus -isystem /usr/include/KF5/KIdentityManagement -isystem
/usr/include/KF5/AkonadiCore -isystem /usr/include/KF5/KContacts -Wall -Wextra
-Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith
-Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type
-Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op
-fexceptions -g -std=c++14 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden -fdiagnostics-color=always -Wall -Wextra
-Wlogical-op -Wno-null-dereference -Wshadow -Wunused
-Wno-misleading-indentation -Wsuggest-override -Wcast-qual -Wformat=2
-fno-common -Werror=return-type -fPIC -fexceptions -MD -MT
kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/mymoneyforecast.cpp.o -MF
CMakeFiles/kmm_mymoney.dir/mymoneyforecast.cpp.o.d -o
CMakeFiles/kmm_mymoney.dir/mymoneyforecast.cpp.o -c
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneyforecast.cpp
In file included from
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneyaccount.h:23:0,
from
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneyforecast.cpp:24:
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneykeyvaluecontainer.h: In member
function ‘void MyMoneyKeyValueContainer::setValue(const QString&, T, T)’:
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneykeyvaluecontainer.h:117:5:
warning: declaration of ‘value’ shadows a member of ‘MyMoneyKeyValueContainer’
[-Wshadow]
{
^
/home/xxx/src/kmymoney-2/kmymoney/mymoney/mymoneykeyvaluecontainer.h:97:7:
note: shadowed declaration is here
T value(const QString& key, T defaultValue) const
^~~~~
At the source locations there is:
see
https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/mymoney/mymoneykeyvaluecontainer.h#L117
see
https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/mymoney/mymoneykeyvaluecontainer.h#L97
EXPECTED RESULT
This warnings should not appear.
SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.5
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list