V2523. MISRA. All integer constants of unsigned type should have 'u' or 'U' suffix.

This diagnostic rule is based on the software development guidelines developed by MISRA (Motor Industry Software Reliability Association).

The analyzer has detected an unsigned integer literal without a 'U' / 'u' suffix ('U' in C++). Such literals obscure the code as their type is ambiguous. Besides, the same literals can be of different types in various data models.

Using suffixes to explicitly specify the type helps to avoid ambiguity when reading numeric literals.

Here is an example of code triggering the warning (provided that the literal is of unsigned type on the platform under analysis):

auto typemask = 0xffffffffL;

Bugs Found

Checked Projects
Collected Errors
12 668