Welcome to the community and sorry for the late reply.
This seems like a false-positive. It might be due to failure in parsing some part of your code. To help investigate the problem please generate and share the reproducer file:
Add the reproducer option to the scanner configuration: sonar.cfamily.reproducer= "Full path to the .cpp file that has or include the file that has the false-positive"
Re-running the scanner should generate a file named sonar-cfamily.reproducer in the project directory.
Please share this file. if you think this file contains private information you can send it privately.