Re: RFC: Enabling -Wshadow, by default?

Thomas Baumgart <[email protected]>
Newsgroups gmane.comp.kde.devel.general
Message-ID <2928839.0Pyx7erxpP@sy-346-nb>
On Montag, 5. Januar 2026 19:29:17 CET Christoph Grüninger wrote:

> Hi Friedrich,
> I often resolve compiler warnings and findings from static analyzers. 
> Last year I spotted a real bug where shadowing mislead the original 
> author to use the wrong variable. I could not find the according pull 
> request, I think it was outside of KDE.

We had a shadowing problem causing a misbehavior in KMyMoney, but same here:
I don't find it anymore w/o investing more time than I have available.

> Personally, I consider shadowing a defect and I would not accept it in a 
> review.

+1

-- 

Regards

Thomas Baumgart

-------------------------------------------------------------
My software never has bugs.
It just develops random features ... -- anonymous
-------------------------------------------------------------
signature.asc (application/pgp-signature, 868 B)
-----BEGIN PGP SIGNATURE-----
Comment: http://www.net-bembel.de/

iQIzBAABCgAdFiEEldM0sAUOY2HYD2VASQpC8iaztXcFAmlcwcAACgkQSQpC8iaz
tXe/3RAAwAlYy1AcvwiUMfYlALtZd4WXi9hCtqqKKeJg1WI4dvFUroc1Ns/ItwL8
5rx1Ne+oLy5is83IHJbXgk9PxiXBM/poLtf0ANjigmbLVRtFTytI0G0eBjk3KJBT
1volYsvqW6JX3Yd7KXPJ0ODkwEMUIVEBxbOpBWXHD/iAx0bNjDgFVCr+21PBbvFK
LBTibGdRvnXFmHuAcoHxDEKhqgySP/i6cvzo9OeUYyLBZFNbpaVza93VirUb158n
DT/vWLpEEjfBnkjQF3EXoPoInbDrK4r9pRZm9ZgiQz3JI9p7gpPrn56d+iAC/Ymv
h1u6yjYM+R5/ItaSNbgJCU+1lxua5SXzk/agt808tCh4xRZG8WO1FDMemw7yBzwA
s2CFZyyiU58QY/AgBd85ViWbBqpVUq0vkdjWrYG7oqBVDlgiK+wWOu+T5TQVcSVt
EYbJhcefKFCd8Mz74cyrP5bU/XD7VWIfAg4jncdIAiwdFJswQoVPuIdJTaUwAqDx
hEQrE+tLaXTfIPbYJRPWF/WFC8c3Pox3YxOL0BXC92aQ4tsv5EMUY5X3pRIVLBn7
uYz5NBvKdQrJA0xuiog5K5gHRHBON9yRCp3CQJ0D/pTP83wP1s0AptwPF8aaGhXE
c2Xj4G5i9R5yX/fEdA0l+qGB810IIdLWALgy/5DgoVgj7tpSI9s=
=GuKd
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.