[previous] 1325 [next] '%s()' is defined with a non-void return type but contains 'return;'. This is not allowed in C++.
Functions

This return statement has no return expression but the function has been explicitly defined with a non-void return type. The behaviour will be undefined in C but is explicitly not permitted in C++.

For example:


/*PRQA S 2017,3408 ++*/

extern float foo(void)
{
   /* ... */
   return;                      /* Messages 0745 and 1325 */
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents