I just double-checked on that: godbolt uses the “Sonar Way” profile by default.
By enforcing cpp:S835 using an internal option, I can reproduce the false positive in godbolt.
I’ve created a respective ticket at SonarCFamily - Issues - Jira.
Feel free to track progress on this FP.
Cheers