Dataflow Analysis

Conversion to signed

MessageText
2850 Constant: Implicit conversion to a signed integer type of insufficient size.
2851 Definite: Implicit conversion to a signed integer type of insufficient size.
2852 Apparent: Implicit conversion to a signed integer type of insufficient size.
2853 Suspicious: Implicit conversion to a signed integer type of insufficient size.
2855 Constant: Casting to a signed integer type of insufficient size.
2856 Definite: Casting to a signed integer type of insufficient size.
2857 Apparent: Casting to a signed integer type of insufficient size.
2858 Suspicious: Casting to a signed integer type of insufficient size.
2940 Constant: Result of implicit conversion is only representable in a two's complement implementation.
2941 Definite: Result of implicit conversion is only representable in a two's complement implementation.
2942 Apparent: Result of implicit conversion is only representable in a two's complement implementation.
2943 Suspicious: Result of implicit conversion is only representable in a two's complement implementation.
2945 Constant: Result of cast is only representable in a two's complement implementation.
2946 Definite: Result of cast is only representable in a two's complement implementation.
2947 Apparent: Result of cast is only representable in a two's complement implementation.
2948 Suspicious: Result of cast is only representable in a two's complement implementation.

Conversion to unsigned

MessageText
2890 Constant: Negative value implicitly converted to an unsigned type.
2891 Definite: Negative value implicitly converted to an unsigned type.
2892 Apparent: Negative value implicitly converted to an unsigned type.
2893 Suspicious: Negative value implicitly converted to an unsigned type.
2895 Constant: Negative value cast to an unsigned type.
2896 Definite: Negative value cast to an unsigned type.
2897 Apparent: Negative value cast to an unsigned type.
2898 Suspicious: Negative value cast to an unsigned type.
2900 Constant: Positive integer value truncated by implicit conversion to a smaller unsigned type.
2901 Definite: Positive integer value truncated by implicit conversion to a smaller unsigned type.
2902 Apparent: Positive integer value truncated by implicit conversion to a smaller unsigned type.
2903 Suspicious: Positive integer value truncated by implicit conversion to a smaller unsigned type.
2905 Constant: Positive integer value truncated by cast to a smaller unsigned type.
2906 Definite: Positive integer value truncated by cast to a smaller unsigned type.
2907 Apparent: Positive integer value truncated by cast to a smaller unsigned type.
2908 Suspicious: Positive integer value truncated by cast to a smaller unsigned type.

Shift operations

MessageText
2790 Constant: Right hand operand of shift operator is negative or too large.
2791 Definite: Right hand operand of shift operator is negative or too large.
2792 Apparent: Right hand operand of shift operator is negative or too large.
2793 Suspicious: Right hand operand of shift operator is negative or too large.
2860 Constant: Implementation-defined value resulting from left shift operation on expression of signed type.
2861 Definite: Implementation-defined value resulting from left shift operation on expression of signed type.
2862 Apparent: Implementation-defined value resulting from left shift operation on expression of signed type.
2863 Suspicious: Implementation-defined value resulting from left shift operation on expression of signed type.
2920 Constant: Left shift operation on expression of unsigned type results in loss of high order bits.
2921 Definite: Left shift operation on expression of unsigned type results in loss of high order bits.
2922 Apparent: Left shift operation on expression of unsigned type results in loss of high order bits.
2923 Suspicious: Left shift operation on expression of unsigned type results in loss of high order bits.

Overflow and wraparound

MessageText
2800 Constant: Overflow in signed arithmetic operation.
2801 Definite: Overflow in signed arithmetic operation.
2802 Apparent: Overflow in signed arithmetic operation.
2803 Suspicious: Overflow in signed arithmetic operation.
2830 Constant: Division by zero.
2831 Definite: Division by zero.
2832 Apparent: Division by zero.
2833 Suspicious: Division by zero.
2834 Possible: Division by zero.
2910 Constant: Wraparound in unsigned arithmetic operation.
2911 Definite: Wraparound in unsigned arithmetic operation.
2912 Apparent: Wraparound in unsigned arithmetic operation.
2913 Suspicious: Wraparound in unsigned arithmetic operation.

Arrays

MessageText
2840 Constant: Dereference of an invalid pointer value.
2841 Definite: Dereference of an invalid pointer value.
2842 Apparent: Dereference of an invalid pointer value.
2843 Suspicious: Dereference of an invalid pointer value.
2845 Constant: Maximum number of characters to be written is larger than the target buffer size.
2846 Definite: Maximum number of characters to be written is larger than the target buffer size.
2847 Apparent: Maximum number of characters to be written is larger than the target buffer size.
2848 Suspicious: Maximum number of characters to be written is larger than the target buffer size.
2930 Constant: Computing an invalid pointer value.
2931 Definite: Computing an invalid pointer value.
2932 Apparent: Computing an invalid pointer value.
2933 Suspicious: Computing an invalid pointer value.
2950 Constant: Negative value used in array subscript or pointer arithmetic operation.
2951 Definite: Negative value used in array subscript or pointer arithmetic operation.
2952 Apparent: Negative value used in array subscript or pointer arithmetic operation.
2953 Suspicious: Negative value used in array subscript or pointer arithmetic operation.

Pointers

MessageText
2771 Definite: These pointers address different objects.
2772 Apparent: These pointers address different objects.
2773 Suspicious: These pointers address different objects.
2776 Definite: Copy between overlapping objects.
2777 Apparent: Copy between overlapping objects.
2778 Suspicious: Copy between overlapping objects.

NULL pointers

MessageText
2810 Constant: Dereference of NULL pointer.
2811 Definite: Dereference of NULL pointer.
2812 Apparent: Dereference of NULL pointer.
2813 Suspicious: Dereference of NULL pointer.
2814 Possible: Dereference of NULL pointer.
2820 Constant: Arithmetic operation on NULL pointer.
2821 Definite: Arithmetic operation on NULL pointer.
2822 Apparent: Arithmetic operation on NULL pointer.
2823 Suspicious: Arithmetic operation on NULL pointer.
2824 Possible: Arithmetic operation on NULL pointer.

Unset data

MessageText
2961 Definite: Using value of uninitialized automatic object '%s'.
2962 Apparent: Using value of uninitialized automatic object '%s'.
2963 Suspicious: Using value of uninitialized automatic object '%s'.
2971 Definite: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const.
2972 Apparent: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const.
2973 Suspicious: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const.

Redundancy

MessageText
2980 The value of this function parameter is never used before being modified.
2981 This initialization is redundant. The value of this object is never used before being modified.
2982 This assignment is redundant. The value of this object is never used before being modified.
2983 This assignment is redundant. The value of this object is never subsequently used.
2984 This operation is redundant. The value of the result is always '%1s'.
2985 This operation is redundant. The value of the result is always that of the left-hand operand.
2986 This operation is redundant. The value of the result is always that of the right-hand operand.

Invariant operations

MessageText
2740 This loop controlling expression is a constant expression and its value is 'true'.
2741 This 'if' controlling expression is a constant expression and its value is 'true'.
2742 This 'if' controlling expression is a constant expression and its value is 'false'.
2743 This 'do - while' loop controlling expression is a constant expression and its value is 'false'. The loop will only be executed once.
2744 This 'while' or 'for' loop controlling expression is a constant expression and its value is 'false'. The loop will not be entered.
2990 The value of this loop controlling expression is always 'true'.
2991 The value of this 'if' controlling expression is always 'true'.
2992 The value of this 'if' controlling expression is always 'false'.
2993 The value of this 'do - while' loop controlling expression is always 'false'. The loop will only be executed once.
2994 The value of this 'while' or 'for' loop controlling expression is always 'false'. The loop will not be entered.
2995 The result of this logical operation is always 'true'.
2996 The result of this logical operation is always 'false'.

Control flow

MessageText
2870 Infinite loop construct with constant control expression.
2871 Infinite loop identified.
2872 This loop, if entered, will never terminate.
2877 This loop will never be executed more than once.
2880 This code is unreachable.
2881 The code in this 'default' clause is unreachable.
2882 This 'switch' statement will bypass the initialization of local variables.
2883 This 'goto' statement will always bypass the initialization of local variables.
2887 Function 'main' ends with an implicit 'return' statement.
2888 This function has been declared with a non-void 'return' type but ends with an implicit 'return ;' statement.
2889 This function has more than one 'return' path.

QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents