[previous] 4436 [next] A constant expression of 'essentially signed' type (%1s) is being converted to unsigned type, '%2s' on assignment.
Arithmetic type - Assignment

This message is issued whenever a constant expression of essentially signed type undergoes an assigning conversion to an unsigned integer type.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 4436,1290 --*/

void foo (unsigned b);

unsigned f4436 (void)
{
  unsigned uia = (1+1);     /* 4436 */

  foo (3 * 10);             /* 4436 */

  foo (0);                  /* 1290 */

  uia = (-1);               /* 4436 */

  return (+1);              /* 4436 */
}

Note that message 1290 will be generated for a constant instead.

See also:

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