V710. Suspicious declaration found. There is no point to declare constant reference to a number.

The analyzer has detected a suspicious code fragment where a constant reference to a numerical literal is created. This operation doesn't have any practical sense and is most likely to be a consequence of some typo. It may involve using a wrong macro or something else.

A couple of examples:

const int & u = 7;
const double & v = 4.2;

You'd better not suppress this warning but eliminate it by deleting the ampersand character thus turning the reference into a regular constant value (of course, you should check first that it all was meant exactly that way):

const int u = 7;
const double v = 4.2;

Bugs Found

Checked Projects
Collected Errors
14 469
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →