I check with today's version (https://github.com/danmar/cppcheck/commit/61e8b84578263d018c9398efe9b4137e513cda3e) which includes Fix #11607 FP constVariable with auto and std::map (#4877) and it seems the problem is still there. Warning is reported, even on the function:
Hello, the following code:
produces on the for line a warning:
but row cannot be declared const because the map operator [] is not const.
Tested using Cppcheck 2.10 dev.
Thanks
Last edit: Pierre DEL PERUGIA 2023-03-08
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11607
Hi, thanks.
I check with today's version (https://github.com/danmar/cppcheck/commit/61e8b84578263d018c9398efe9b4137e513cda3e) which includes
Fix #11607 FP constVariable with auto and std::map (#4877)
and it seems the problem is still there. Warning is reported, even on the function:Not sure what's going on, both samples are clean with head on my end.
Sorry, my mistake: bad deploy of the new bin.
Thanks a lot!