+
+ Guideline | Category | Description | Assistance/Enforcement Sub Rules |
+
+ ARR02 |
+ Recommendation |
+ Explicitly specify array bounds, even if implicitly defined by an initializer |
+
+ Qac | Description |
+
+ qac-0678 |
+ [u] Array element is array of unknown size. Arrays cannot be constructed from incomplete types. |
+
+
+ qac-0688 |
+ Array size determined by number of initializers which include concatenated string literals. |
+
+
+ qac-3674 |
+ Array size defined implicitly by the number of initializers. |
+
+
+ qac-3684 |
+ Array declared with unknown size. |
+
+
+ |
+
+
+ ARR30 |
+ Rule |
+ Do not form or use out-of-bounds pointers or array subscripts |
+
+ Qac | Description |
+
+ qac-2820 |
+ Constant: Arithmetic operation on NULL pointer. |
+
+
+ qac-2821 |
+ Definite: Arithmetic operation on NULL pointer. |
+
+
+ qac-2822 |
+ Apparent: Arithmetic operation on NULL pointer. |
+
+
+ qac-2823 |
+ Suspicious: Arithmetic operation on NULL pointer. |
+
+
+ qac-2840 |
+ Constant: Dereference of an invalid pointer value. |
+
+
+ qac-2841 |
+ Definite: Dereference of an invalid pointer value. |
+
+
+ qac-2842 |
+ Apparent: Dereference of an invalid pointer value. |
+
+
+ qac-2843 |
+ Suspicious: Dereference of an invalid pointer value. |
+
+
+ qac-2930 |
+ Constant: Computing an invalid pointer value. |
+
+
+ qac-2931 |
+ Definite: Computing an invalid pointer value. |
+
+
+ qac-2932 |
+ Apparent: Computing an invalid pointer value. |
+
+
+ qac-2933 |
+ Suspicious: Computing an invalid pointer value. |
+
+
+ qac-2935 |
+ Constant: Dereference of an invalid char pointer value. |
+
+
+ qac-2936 |
+ Definite: Dereference of an invalid char pointer value. |
+
+
+ qac-2937 |
+ Apparent: Dereference of an invalid char pointer value. |
+
+
+ qac-2938 |
+ Suspicious: Dereference of an invalid char pointer value. |
+
+
+ qac-2950 |
+ Constant: Negative value used in array subscript or pointer arithmetic operation. |
+
+
+ qac-2951 |
+ Definite: Negative value used in array subscript or pointer arithmetic operation. |
+
+
+ qac-2952 |
+ Apparent: Negative value used in array subscript or pointer arithmetic operation. |
+
+
+ qac-2953 |
+ Suspicious: Negative value used in array subscript or pointer arithmetic operation. |
+
+
+ |
+
+
+ ARR32 |
+ Rule |
+ Ensure size arguments for variable length arrays are in a valid range |
+
+ Qac | Description |
+
+ qac-1051 |
+ [C99] A variable length array has been declared. |
+
+
+ |
+
+
+ ARR36 |
+ Rule |
+ Do not subtract or compare two pointers that do not refer to the same array |
+
+ Qac | Description |
+
+ qac-0487 |
+ [C] If two pointers are subtracted, they must be pointers that address compatible types. |
+
+
+ qac-0513 |
+ [C] Relational operator used to compare pointers to incompatible types. |
+
+
+ qac-2668 |
+ Subtraction of a pointer to an array and a pointer to a non-array. |
+
+
+ qac-2669 |
+ Comparison of a pointer to an array and a pointer to a non-array. |
+
+
+ qac-2761 |
+ Definite: Subtracting pointers that address different objects. |
+
+
+ qac-2762 |
+ Apparent: Subtracting pointers that address different objects. |
+
+
+ qac-2763 |
+ Suspicious: Subtracting pointers that address different objects. |
+
+
+ qac-2766 |
+ Definite: Subtracting pointers that address different members of the same object. |
+
+
+ qac-2767 |
+ Apparent: Subtracting pointers that address different members of the same object. |
+
+
+ qac-2768 |
+ Suspicious: Subtracting pointers that address different members of the same object. |
+
+
+ qac-2771 |
+ Definite: Comparing pointers that address different objects. |
+
+
+ qac-2772 |
+ Apparent: Comparing pointers that address different objects. |
+
+
+ qac-2773 |
+ Suspicious: Comparing pointers that address different objects. |
+
+
+ |
+
+
+ ARR37 |
+ Rule |
+ Do not add or subtract an integer to a pointer to a non-array object |
+
+ Qac | Description |
+
+ qac-2930 |
+ Constant: Computing an invalid pointer value. |
+
+
+ qac-2931 |
+ Definite: Computing an invalid pointer value. |
+
+
+ qac-2932 |
+ Apparent: Computing an invalid pointer value. |
+
+
+ qac-2933 |
+ Suspicious: Computing an invalid pointer value. |
+
+
+ |
+
+
+ ARR38 |
+ Rule |
+ Guarantee that library functions do not form invalid pointers |
+
+ Qac | Description |
+
+ qac-2840 |
+ Constant: Dereference of an invalid pointer value. |
+
+
+ qac-2841 |
+ Definite: Dereference of an invalid pointer value. |
+
+
+ qac-2842 |
+ Apparent: Dereference of an invalid pointer value. |
+
+
+ qac-2843 |
+ Suspicious: Dereference of an invalid pointer value. |
+
+
+ qac-2845 |
+ Constant: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2846 |
+ Definite: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2847 |
+ Apparent: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2848 |
+ Suspicious: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2935 |
+ Constant: Dereference of an invalid char pointer value. |
+
+
+ qac-2936 |
+ Definite: Dereference of an invalid char pointer value. |
+
+
+ qac-2937 |
+ Apparent: Dereference of an invalid char pointer value. |
+
+
+ qac-2938 |
+ Suspicious: Dereference of an invalid char pointer value. |
+
+
+ qac-4880 |
+ Constant: Pointed to object has smaller size than the size_t argument. |
+
+
+ qac-4881 |
+ Definite: Pointed to object has smaller size than the size_t argument. |
+
+
+ qac-4882 |
+ Apparent: Pointed to object has smaller size than the size_t argument. |
+
+
+ qac-4883 |
+ Suspicious: Pointed to object has smaller size than the size_t argument. |
+
+
+ |
+
+
+ ARR39 |
+ Rule |
+ Do not add or subtract a scaled integer to a pointer |
+
+ Qac | Description |
+
+ qac-4955 |
+ Constant: Adding/subtracting a scaled integer to a pointer. |
+
+
+ qac-4956 |
+ Definite: Adding/subtracting a scaled integer to a pointer. |
+
+
+ qac-4957 |
+ Apparent: Adding/subtracting a scaled integer to a pointer. |
+
+
+ |
+
+
+ CON30 |
+ Rule |
+ Clean up thread-specific storage |
+
+ Qac | Description |
+
+ mta-1780 |
+ Memory associated with the TLS key '%1s' is deallocated more than once. |
+
+
+ mta-1781 |
+ Memory associated with the TLS key '%1s' may be deallocated more than once. |
+
+
+ mta-1782 |
+ Memory associated with the TLS key '%1s' is deallocated in a way that does not match its allocation. |
+
+
+ mta-1783 |
+ Memory associated with the TLS key '%1s' is not deallocated. |
+
+
+ mta-1784 |
+ The origin of the TLS key '%1s' cannot be identified. Perhaps it should have been passed as a thread parameter? |
+
+
+ |
+
+
+ CON31 |
+ Rule |
+ Do not destroy a mutex while it is locked |
+
+ Qac | Description |
+
+ qac-4961 |
+ Definite: Attempt to destroy a mutex which is still locked |
+
+
+ qac-4962 |
+ Apparent: Attempt to destroy a mutex which is still locked |
+
+
+ |
+
+
+ CON32 |
+ Rule |
+ Prevent data races when accessing bit-fields from multiple threads |
+
+ Qac | Description |
+
+ mta-1774 |
+ Definite: data race for an object '%1s' which shares its physical storage location with one or more others. |
+
+
+ mta-1775 |
+ Apparent: data race for an object '%1s' which shares its physical storage location with one or more others. |
+
+
+ |
+
+
+ CON33 |
+ Rule |
+ Avoid race conditions when using library functions |
+
+ Qac | Description |
+
+ qac-4976 |
+ Definite: Call to a non-reentrant function outside of a critical section. |
+
+
+ qac-4977 |
+ Apparent: Call to a non-reentrant function outside of a critical section. |
+
+
+ certccm-5037 |
+ Use of '%1s'. |
+
+
+ |
+
+
+ CON34 |
+ Rule |
+ Declare objects shared between threads with appropriate storage durations |
+
+ Qac | Description |
+
+ qac-4926 |
+ Definite: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ qac-4927 |
+ Apparent: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ qac-4928 |
+ Suspicious: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ |
+
+
+ CON35 |
+ Rule |
+ Avoid deadlock by locking in a predefined order |
+
+ Qac | Description |
+
+ mta-1772 |
+ Mutex '%1s' violates the lock hierarchy, as it is acquired before '%2s' elsewhere %3s% of the time. |
+
+
+ mta-1773 |
+ Mutexes '%1s' and '%2s' are not ordered in the lock hierarchy. |
+
+
+ |
+
+
+ CON36 |
+ Rule |
+ Wrap functions that can spuriously wake up in a loop |
+
+ Qac | Description |
+
+ qac-2027 |
+ This function can wake spuriously, but does not appear to be wrapped in a loop. |
+
+
+ |
+
+
+ CON37 |
+ Rule |
+ Do not call signal() in a multithreaded program |
+
+ Qac | Description |
+
+ certccm-5021 |
+ '%s' is being used. |
+
+
+ |
+
+
+ CON38 |
+ Rule |
+ Preserve thread safety and liveness when using condition variables |
+
+ Qac | Description |
+
+ mta-1778 |
+ Condition variable '%1s' is signaled and used with multiple wait operations. |
+
+
+ mta-1779 |
+ Condition variable '%1s' is signaled and used with a re-entered wait operation. |
+
+
+ |
+
+
+ CON39 |
+ Rule |
+ Do not join or detach a thread that was previously joined or detached |
+
+ Qac | Description |
+
+ mta-1776 |
+ Thread '%1s' is made unjoinable multiple times. |
+
+
+ |
+
+
+ CON40 |
+ Rule |
+ Do not refer to an atomic variable twice in an expression |
+
+ Qac | Description |
+
+ qac-1114 |
+ This atomic variable is referenced directly twice in the same expression. |
+
+
+ qac-1115 |
+ This atomic lvalue appears to be referenced twice in the same expression. |
+
+
+ qac-1116 |
+ This atomic variable appears to be updated non-atomically. |
+
+
+ |
+
+
+ CON41 |
+ Rule |
+ Wrap functions that can fail spuriously in a loop |
+
+ Qac | Description |
+
+ qac-2026 |
+ This function can fail spuriously, but does not appear to be wrapped in a loop. |
+
+
+ |
+
+
+ CON43 |
+ Rule |
+ Do not allow data races in multithreaded code |
+
+ Qac | Description |
+
+ mta-1765 |
+ Definite: data race for object '%1s'. |
+
+
+ mta-1766 |
+ Apparent: data race for object '%1s'. |
+
+
+ mta-1770 |
+ Definite: data race for a volatile object '%1s'. |
+
+
+ mta-1771 |
+ Definite: data race for a mutable object '%1s'. |
+
+
+ |
+
+
+ DCL00 |
+ Recommendation |
+ Const-qualify immutable objects |
+
+ Qac | Description |
+
+ qac-3204 |
+ The variable '%s' is only set once and so it could be declared with the 'const' qualifier. |
+
+
+ qac-3227 |
+ The parameter '%s' is never modified and so it could be declared with the 'const' qualifier. |
+
+
+ qac-3232 |
+ File scope static, '%s', is never modified. It could be declared const. |
+
+
+ qac-3673 |
+ The object addressed by the pointer parameter '%1s' is not modified and so the pointer could be of type 'pointer to const'. |
+
+
+ qac-3677 |
+ The elements of the array parameter '%1s' are not modified and so they could be qualified as 'const'. |
+
+
+ |
+
+
+ DCL01 |
+ Recommendation |
+ Do not reuse variable names in subscopes |
+
+ Qac | Description |
+
+ qac-0795 |
+ Identifier matches other identifier(s) (e.g. '%1s') in an outer scope within the specified number of significant characters. |
+
+
+ qac-0796 |
+ Identifier matches other identifier(s) (e.g. '%1s') in an outer scope within the ISO:C99 limit of 63 significant characters |
+
+
+ qac-2547 |
+ This declaration of tag '%s' hides a more global declaration. |
+
+
+ qac-3334 |
+ This declaration of '%1s' hides a more global declaration. |
+
+
+ |
+
+
+ DCL05 |
+ Recommendation |
+ Use typedefs of non-pointer types only |
+
+ Qac | Description |
+
+ certccm-5004 |
+ This typedef is applied to a pointer type. |
+
+
+ |
+
+
+ DCL06 |
+ Recommendation |
+ Use meaningful symbolic constants to represent literal values |
+
+ Qac | Description |
+
+ qac-3120 |
+ Hard-coded 'magic' integer constant, '%1s'. |
+
+
+ qac-3121 |
+ Hard-coded 'magic' floating constant, '%1s'. |
+
+
+ qac-3122 |
+ Hard-coded 'magic' string literal, %1s. |
+
+
+ qac-3123 |
+ Hard coded 'magic' character constant, %1s. |
+
+
+ qac-3131 |
+ Hard coded 'magic' number, '%1s', used to define the size of a bit-field. |
+
+
+ qac-3132 |
+ Hard coded 'magic' number, '%1s', used to define the size of an array. |
+
+
+ |
+
+
+ DCL07 |
+ Recommendation |
+ Include the appropriate type information in function declarators |
+
+ Qac | Description |
+
+ qac-1304 |
+ Old style definition of function '%1s()' is not portable to C++. |
+
+
+ qac-2050 |
+ The 'int' type specifier has been omitted from a function declaration. |
+
+
+ qac-3331 |
+ The definition for identifier '%s' with external linkage conflicts with a previous declaration in the same scope. |
+
+
+ qac-3335 |
+ No function declaration. Implicit declaration inserted: 'extern int %s();'. |
+
+
+ qac-3408 |
+ '%1s' has external linkage and is being defined without any previous declaration. |
+
+
+ qac-3450 |
+ Function '%s', with internal linkage, is being defined without a previous declaration. |
+
+
+ |
+
+
+ DCL10 |
+ Recommendation |
+ Maintain the contract between the writer and caller of variadic functions |
+
+ Qac | Description |
+
+ qac-0184 |
+ [U] Insufficient arguments to satisfy conversion specifier, number %1s. |
+
+
+ qac-0185 |
+ [U] Call contains more arguments than conversion specifiers. |
+
+
+ |
+
+
+ DCL11 |
+ Recommendation |
+ Understand the type issues associated with variadic functions |
+
+ Qac | Description |
+
+ qac-0179 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0184 |
+ [U] Insufficient arguments to satisfy conversion specifier, number %1s. |
+
+
+ qac-0185 |
+ [U] Call contains more arguments than conversion specifiers. |
+
+
+ qac-0186 |
+ [U] A call to this function must include at least one argument. |
+
+
+ qac-0190 |
+ [U] Using unsupported conversion specifier number %1s. |
+
+
+ qac-0191 |
+ [U] Unknown length modifier used with 'd/i/n' conversion specifier, number %1s. |
+
+
+ qac-0192 |
+ [U] Unknown length modifier used with 'o' conversion specifier, number %1s. |
+
+
+ qac-0193 |
+ [U] Unknown length modifier used with 'u' conversion specifier, number %1s. |
+
+
+ qac-0194 |
+ [U] Unknown length modifier used with 'x/X' conversion specifier, number %1s. |
+
+
+ qac-0195 |
+ [U] Unknown length modifier used with 'e/E/f/F/g/G' conversion specifier, number %1s. |
+
+
+ qac-0196 |
+ [U] Unknown length modifier used with 's' conversion specifier, number %1s. |
+
+
+ qac-0197 |
+ [U] Unknown length modifier used with 'p' conversion specifier, number %1s. |
+
+
+ qac-0198 |
+ [U] Unknown length modifier used with '%%' conversion specifier, number %1s. |
+
+
+ qac-0199 |
+ [U] Unknown length modifier used with '[' conversion specifier, number %1s. |
+
+
+ qac-0200 |
+ [U] Unknown length modifier used with 'c' conversion specifier, number %1s. |
+
+
+ qac-0201 |
+ [U] Incomplete conversion specifier, number %1s. |
+
+
+ qac-0206 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0207 |
+ [U] 'scanf' expects address of objects being stored into. |
+
+
+ qac-0208 |
+ [U] Same character occurs in scanset more than once. |
+
+
+ |
+
+
+ DCL13 |
+ Recommendation |
+ Declare function parameters that are pointers to values not changed by the function as const |
+
+ Qac | Description |
+
+ qac-0431 |
+ [C] Function argument points to a more heavily qualified type. |
+
+
+ qac-3673 |
+ The object addressed by the pointer parameter '%1s' is not modified and so the pointer could be of type 'pointer to const'. |
+
+
+ qac-3677 |
+ The elements of the array parameter '%1s' are not modified and so they could be qualified as 'const'. |
+
+
+ |
+
+
+ DCL15 |
+ Recommendation |
+ Declare file-scope objects or functions that do not need external linkage as static |
+
+ Qac | Description |
+
+ rcma-1504 |
+ The object '%1s' is only referenced in the translation unit where it is defined. |
+
+
+ rcma-1531 |
+ The object '%1s' is referenced in only one translation unit - but not the one in which it is defined. |
+
+
+ |
+
+
+ DCL16 |
+ Recommendation |
+ Use 'L', not 'l', to indicate a long value |
+
+ Qac | Description |
+
+ qac-1280 |
+ A lowercase letter L (l) has been used in an integer or floating suffix. |
+
+
+ |
+
+
+ DCL18 |
+ Recommendation |
+ Do not begin integer constants with 0 when specifying a decimal value |
+
+ Qac | Description |
+
+ qac-0339 |
+ Octal constant used. |
+
+
+ qac-1272 |
+ Redundant leading zeroes on a numeric constant. |
+
+
+ |
+
+
+ DCL19 |
+ Recommendation |
+ Minimize the scope of variables and functions |
+
+ Qac | Description |
+
+ rcma-1504 |
+ The object '%1s' is only referenced in the translation unit where it is defined. |
+
+
+ rcma-1505 |
+ The function '%1s' is only referenced in the translation unit where it is defined. |
+
+
+ rcma-1531 |
+ The object '%1s' is referenced in only one translation unit - but not the one in which it is defined. |
+
+
+ rcma-1532 |
+ The function '%1s' is only referenced in one translation unit - but not the one in which it is defined. |
+
+
+ qac-3210 |
+ The global identifier '%1s' is declared here but is not used in this translation unit. |
+
+
+ qac-3218 |
+ File scope static, '%1s', is only accessed in one function. |
+
+
+ |
+
+
+ DCL20 |
+ Recommendation |
+ Explicitly specify void when a function accepts no arguments |
+
+ Qac | Description |
+
+ qac-3001 |
+ Function has been declared with an empty parameter list. |
+
+
+ qac-3007 |
+ "void" has been omitted when defining a function with no parameters. |
+
+
+ |
+
+
+ DCL21 |
+ Recommendation |
+ Understand the storage of compound literals |
+
+ Qac | Description |
+
+ qac-1054 |
+ [C99] A compound literal has been used. |
+
+
+ qac-3217 |
+ Address of automatic object exported to a pointer with linkage or wider scope. |
+
+
+ |
+
+
+ DCL23 |
+ Recommendation |
+ Guarantee that mutually visible identifiers are unique |
+
+ Qac | Description |
+
+ qac-0627 |
+ [C] '%s' has different type to previous declaration in the same scope. |
+
+
+ qac-0776 |
+ [L] External identifier matches other external identifier(s) (e.g. '%1s') in first 6 characters - program does not conform strictly to ISO:C90. |
+
+
+ qac-0777 |
+ [U] External identifier does not differ from other identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0778 |
+ [L] Identifier matches other identifier(s) (e.g. '%1s') in first 31 characters - program does not conform strictly to ISO:C90. |
+
+
+ qac-0779 |
+ [U] Identifier does not differ from other identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0789 |
+ [L] Identifier matches other identifier(s) (e.g. '%1s') in first 63 characters - program does not conform strictly to ISO:C99. |
+
+
+ qac-0791 |
+ [U] Macro identifier does not differ from other macro identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0793 |
+ [L] Macro identifier matches other macro identifier(s) (e.g. '%1s') in first 63 characters - program does not conform strictly to ISO:C99. |
+
+
+ |
+
+
+ DCL30 |
+ Rule |
+ Declare objects with appropriate storage durations |
+
+ Qac | Description |
+
+ qac-3217 |
+ Address of automatic object exported to a pointer with linkage or wider scope. |
+
+
+ qac-3225 |
+ Address of automatic object exported using a function parameter. |
+
+
+ qac-3230 |
+ Address of automatic object assigned to local pointer with static storage duration. |
+
+
+ qac-4140 |
+ Address of automatic object exported in function return value. |
+
+
+ |
+
+
+ DCL31 |
+ Rule |
+ Declare identifiers before using them |
+
+ Qac | Description |
+
+ qac-0434 |
+ [S] The identifier '%s' has not been declared. |
+
+
+ qac-2050 |
+ The 'int' type specifier has been omitted from a function declaration. |
+
+
+ qac-2051 |
+ The 'int' type specifier has been omitted from an object declaration. |
+
+
+ qac-3335 |
+ No function declaration. Implicit declaration inserted: 'extern int %s();'. |
+
+
+ |
+
+
+ DCL36 |
+ Rule |
+ Do not declare an identifier with conflicting linkage classifications |
+
+ Qac | Description |
+
+ qac-0625 |
+ [U] '%s' has been declared with both internal and external linkage - the behaviour is undefined. |
+
+
+ |
+
+
+ DCL37 |
+ Rule |
+ Do not declare or define a reserved identifier |
+
+ Qac | Description |
+
+ qac-0602 |
+ [U] The identifier '%s' is reserved for use by the library. |
+
+
+ qac-0603 |
+ [U] The macro identifier '%s' is reserved. |
+
+
+ qac-4600 |
+ The macro '%1s' is also defined in '<%2s>'. |
+
+
+ qac-4601 |
+ The macro '%1s' is the name of an identifier in '<%2s>'. |
+
+
+ qac-4602 |
+ The identifier '%1s' is declared as a macro in '<%2s>'. |
+
+
+ qac-4603 |
+ The object/function '%1s'is being defined with the same name as an ordinary identifier defined in '<%2s>'. |
+
+
+ qac-4604 |
+ The object/function '%1s' is being declared with the same name as an ordinary identifier defined in '<%2s>'. |
+
+
+ qac-4605 |
+ The typedef '%1s' is also defined in '<%2s>'. |
+
+
+ qac-4606 |
+ The typedef '%1s' has the same name as another ordinary identifier in '<%2s>'. |
+
+
+ qac-4607 |
+ The enum constant '%1s' has the same name as another ordinary identifier in '<%2s>'. |
+
+
+ qac-4608 |
+ The tag '%1s' is also defined in '<%2s>'. |
+
+
+ qac-4620 |
+ The macro '%1s' may also be defined as a macro in '<%2s>'. |
+
+
+ qac-4621 |
+ The macro '%1s' may also be defined as a typedef in '<%2s>'. |
+
+
+ qac-4622 |
+ The identifier '%1s' may be defined as a macro in '<%2s>'. |
+
+
+ qac-4623 |
+ The typedef '%1s' may also be defined in '<%2s>'. |
+
+
+ qac-4624 |
+ The ordinary identifier '%1s' may be defined as a typedef in '<%2s>'. |
+
+
+ qac-4640 |
+ The macro '%1s' could conflict in the future with the name of a macro in '<%2s>'. |
+
+
+ qac-4641 |
+ The identifier '%1s' could conflict in the future with the name of a macro in '<%2s>'. |
+
+
+ qac-4642 |
+ The macro '%1s' could conflict in the future with the name of a function in '<%2s>'. |
+
+
+ qac-4643 |
+ The identifier '%1s' could conflict in the future with the name of a function in '<%2s>'. |
+
+
+ qac-4644 |
+ The macro '%1s' could conflict in the future with the name of a typedef in '<%2s>'. |
+
+
+ qac-4645 |
+ The identifier '%1s' could conflict in the future with the name of a typedef in '<%2s>'. |
+
+
+ |
+
+
+ DCL38 |
+ Rule |
+ Use the correct syntax when declaring a flexible array member |
+
+ Qac | Description |
+
+ qac-1037 |
+ [E] Arrays of length zero are a language extension. |
+
+
+ qac-1039 |
+ [E] Treating array of length one as potentially flexible member. |
+
+
+ |
+
+
+ DCL39 |
+ Rule |
+ Avoid information leakage when passing a structure across a trust boundary |
+
+ Qac | Description |
+
+ qac-4941 |
+ Definite: Passing a padded structure from a trusted boundary to another domain. |
+
+
+ qac-4942 |
+ Apparent: Passing a padded structure from a trusted boundary to another domain. |
+
+
+ qac-4943 |
+ Suspicious: Passing a padded structure from a trusted boundary to another domain. |
+
+
+ |
+
+
+ DCL40 |
+ Rule |
+ Do not create incompatible declarations of the same function or object |
+
+ Qac | Description |
+
+ qac-0776 |
+ [L] External identifier matches other external identifier(s) (e.g. '%1s') in first 6 characters - program does not conform strictly to ISO:C90. |
+
+
+ qac-0778 |
+ [L] Identifier matches other identifier(s) (e.g. '%1s') in first 31 characters - program does not conform strictly to ISO:C90. |
+
+
+ qac-0779 |
+ [U] Identifier does not differ from other identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0789 |
+ [L] Identifier matches other identifier(s) (e.g. '%1s') in first 63 characters - program does not conform strictly to ISO:C99. |
+
+
+ rcma-1510 |
+ '%1s' has external linkage and has incompatible declarations. |
+
+
+ |
+
+
+ DCL41 |
+ Rule |
+ Do not declare variables inside a switch statement before the first case label |
+
+ Qac | Description |
+
+ qac-2008 |
+ Code statements precede the first label in this 'switch' construct. |
+
+
+ qac-2882 |
+ This 'switch' statement will bypass the initialization of local variables. |
+
+
+ qac-3234 |
+ Declarations precede the first label in this 'switch' construct. |
+
+
+ |
+
+
+ ENV03 |
+ Recommendation |
+ Sanitize the environment when invoking external programs |
+
+ Qac | Description |
+
+ certccm-5017 |
+ '%s' is being used. |
+
+
+ |
+
+
+ ENV30 |
+ Rule |
+ Do not modify the object referenced by the return value of certain functions |
+
+ Qac | Description |
+
+ qac-1492 |
+ The result of library function '%1s' is used to modify the referenced object. |
+
+
+ qac-1493 |
+ The result of library function '%1s' is used as a pointer to a modifiable object. |
+
+
+ qac-1494 |
+ The result of library function '%1s' might be modified. |
+
+
+ qac-4751 |
+ Definite: Modifying an object that is referenced by the return value of a library function. |
+
+
+ qac-4752 |
+ Apparent: Modifying an object that is referenced by the return value of a library function. |
+
+
+ qac-4753 |
+ Suspicious: Modifying an object that is referenced by the return value of a library function. |
+
+
+ |
+
+
+ ENV31 |
+ Rule |
+ Do not rely on an environment pointer following an operation that may invalidate it |
+
+ Qac | Description |
+
+ qac-4991 |
+ Definite: Using an invalidated value '%s' of the environment pointer passed as the third argument to main. |
+
+
+ qac-4992 |
+ Apparent: Using an invalidated value '%s' of the environment pointer passed as the third argument to main. |
+
+
+ qac-4993 |
+ Suspicious: Using an invalidated value '%s' of the environment pointer passed as the third argument to main. |
+
+
+ |
+
+
+ ENV32 |
+ Rule |
+ All exit handlers must return normally |
+
+ Qac | Description |
+
+ qac-4856 |
+ Definite: Atexit handler does not return normally. |
+
+
+ qac-4857 |
+ Apparent: Atexit handler does not return normally. |
+
+
+ qac-4858 |
+ Suspicious: Atexit handler does not return normally. |
+
+
+ |
+
+
+ ENV33 |
+ Rule |
+ Do not call system() |
+
+ Qac | Description |
+
+ certccm-5018 |
+ '%s' is being used. |
+
+
+ |
+
+
+ ENV34 |
+ Rule |
+ Do not store pointers returned by certain functions |
+
+ Qac | Description |
+
+ qac-2681 |
+ Definite: Using an invalidated value '%s' returned from a Standard Library function. |
+
+
+ qac-2682 |
+ Apparent: Using an invalidated value '%s' returned from a Standard Library function. |
+
+
+ qac-2683 |
+ Suspicious: Using an invalidated value '%s' returned from a Standard Library function. |
+
+
+ |
+
+
+ ERR30 |
+ Rule |
+ Set errno to zero before calling a library function known to set errno, and check errno only after the function returns a value indicating failure |
+
+ Qac | Description |
+
+ qac-2500 |
+ Call to '%s' is not immediately preceded by the zero-ing of 'errno'. |
+
+
+ qac-2501 |
+ Call to '%s' is not immediately followed by the testing of 'errno'. |
+
+
+ qac-2502 |
+ Zero-ing of 'errno' is not immediately followed by a call to an 'errno' setting function. |
+
+
+ qac-2503 |
+ Testing of 'errno' is not immediately preceded by a call to an 'errno' setting function. |
+
+
+ |
+
+
+ ERR32 |
+ Rule |
+ Do not rely on indeterminate values of errno |
+
+ Qac | Description |
+
+ qac-2031 |
+ Signal handler '%1s' accesses errno. |
+
+
+ qac-4781 |
+ Definite: Signal handler causes the value of errno to be indeterminate. |
+
+
+ qac-4782 |
+ Apparent: Signal handler causes the value of errno to be indeterminate. |
+
+
+ qac-4783 |
+ Suspicious: Signal handler causes the value of errno to be indeterminate. |
+
+
+ |
+
+
+ ERR33 |
+ Rule |
+ Detect and handle standard library errors |
+
+ Qac | Description |
+
+ qac-3200 |
+ '%s' returns a value which is not being used. |
+
+
+ |
+
+
+ ERR34 |
+ Rule |
+ Detect errors when converting a string to a number |
+
+ Qac | Description |
+
+ certccm-5030 |
+ '%s' is being used. |
+
+
+ |
+
+
+ EXP00 |
+ Recommendation |
+ Use parentheses for precedence of operation |
+
+ Qac | Description |
+
+ qac-3389 |
+ Extra parentheses recommended to clarify the ordering of a % operator and another arithmetic operator (* / % + -). |
+
+
+ qac-3390 |
+ Expression is equivalent to: "%s" |
+
+
+ qac-3391 |
+ Extra parentheses recommended. A conditional operation is the operand of another conditional operator. |
+
+
+ qac-3392 |
+ Extra parentheses recommended. A shift, relational or equality operation is the operand of a second identical operator. |
+
+
+ qac-3393 |
+ Extra parentheses recommended. An arithmetic operation (* / + -) is the operand of a different operator with the same precedence. |
+
+
+ qac-3394 |
+ Extra parentheses recommended. A shift, relational or equality operation is the operand of a different operator with the same precedence. |
+
+
+ qac-3395 |
+ Extra parentheses recommended. A * or / operation is the operand of a + or - operator. |
+
+
+ qac-3396 |
+ Extra parentheses recommended. A binary operation is the operand of a conditional operator. |
+
+
+ qac-3397 |
+ Extra parentheses recommended. A binary operation is the operand of a binary operator with different precedence. |
+
+
+ qac-3398 |
+ Extra parentheses recommended. A function call, array subscript, or member operation is the operand of a logical && or ||. |
+
+
+ qac-3399 |
+ Extra parentheses recommended. A unary operation is the operand of a logical && or ||. |
+
+
+ qac-3400 |
+ Extra parentheses recommended. A binary operation is the operand of a logical && or ||. |
+
+
+ |
+
+
+ EXP02 |
+ Recommendation |
+ Be aware of the short-circuit behavior of the logical AND and OR operators |
+
+ Qac | Description |
+
+ qac-3415 |
+ Right hand operand of '&&' or '||' is an expression with persistent side effects. |
+
+
+ |
+
+
+ EXP03 |
+ Recommendation |
+ Do not assume the size of a structure is the sum of the sizes of its members |
+
+ Qac | Description |
+
+ qac-0697 |
+ The size of the allocated memory block is not an integral multiple of the size of the object type addressed by the pointer cast. |
+
+
+ |
+
+
+ EXP05 |
+ Recommendation |
+ Do not cast away a const qualification |
+
+ Qac | Description |
+
+ qac-0311 |
+ Dangerous pointer cast results in loss of const qualification. |
+
+
+ qac-0431 |
+ [C] Function argument points to a more heavily qualified type. |
+
+
+ |
+
+
+ EXP07 |
+ Recommendation |
+ Do not diminish the benefits of constants by assuming their values in expressions |
+
+ Qac | Description |
+
+ qac-3120 |
+ Hard-coded 'magic' integer constant, '%1s'. |
+
+
+ qac-3121 |
+ Hard-coded 'magic' floating constant, '%1s'. |
+
+
+ qac-3122 |
+ Hard-coded 'magic' string literal, %1s. |
+
+
+ qac-3123 |
+ Hard coded 'magic' character constant, %1s. |
+
+
+ qac-3131 |
+ Hard coded 'magic' number, '%1s', used to define the size of a bit-field. |
+
+
+ qac-3132 |
+ Hard coded 'magic' number, '%1s', used to define the size of an array. |
+
+
+ |
+
+
+ EXP08 |
+ Recommendation |
+ Ensure pointer arithmetic is used correctly |
+
+ Qac | Description |
+
+ qac-0488 |
+ Performing pointer arithmetic. |
+
+
+ qac-2930 |
+ Constant: Computing an invalid pointer value. |
+
+
+ qac-2931 |
+ Definite: Computing an invalid pointer value. |
+
+
+ qac-2932 |
+ Apparent: Computing an invalid pointer value. |
+
+
+ qac-2933 |
+ Suspicious: Computing an invalid pointer value. |
+
+
+ |
+
+
+ EXP10 |
+ Recommendation |
+ Do not depend on the order of evaluation of subexpressions or the order in which side effects take place |
+
+ Qac | Description |
+
+ qac-0400 |
+ [U] '%1s' is modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0401 |
+ [U] '%1s' may be modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0402 |
+ [U] '%1s' is modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0403 |
+ [U] '%1s' may be modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0404 |
+ [U] More than one read access to volatile objects between sequence points. |
+
+
+ qac-0405 |
+ [U] More than one modification of volatile objects between sequence points. |
+
+
+ qac-3226 |
+ The result of an assignment is being used in an arithmetic operation or another assigning operation. |
+
+
+ qac-3326 |
+ The result of an assignment is being used in a logical operation. |
+
+
+ |
+
+
+ EXP11 |
+ Recommendation |
+ Do not make assumptions regarding the layout of structures with bit-fields |
+
+ Qac | Description |
+
+ qac-0310 |
+ Casting to different object pointer type. |
+
+
+ qac-0751 |
+ Casting to char pointer type. |
+
+
+ |
+
+
+ EXP12 |
+ Recommendation |
+ Do not ignore values returned by functions |
+
+ Qac | Description |
+
+ qac-3200 |
+ '%s' returns a value which is not being used. |
+
+
+ |
+
+
+ EXP13 |
+ Recommendation |
+ Treat relational and equality operators as if they were nonassociative |
+
+ Qac | Description |
+
+ qac-3392 |
+ Extra parentheses recommended. A shift, relational or equality operation is the operand of a second identical operator. |
+
+
+ qac-3401 |
+ Possible precedence confusion: extra parentheses are recommended here. |
+
+
+ qac-4111 |
+ Right hand operand of relational operator is a 'Boolean' expression. |
+
+
+ qac-4112 |
+ Left hand operand of relational operator is a 'Boolean' expression. |
+
+
+ qac-4113 |
+ Both operands of relational operator are 'Boolean' expressions. |
+
+
+ |
+
+
+ EXP15 |
+ Recommendation |
+ Do not place a semicolon on the same line as an if, for, or while statement |
+
+ Qac | Description |
+
+ qac-3109 |
+ Null statement follows other code on the same line. |
+
+
+ |
+
+
+ EXP16 |
+ Recommendation |
+ Do not compare function pointers to constant values |
+
+ Qac | Description |
+
+ qac-0428 |
+ Function identifier is not followed by () but a function call may be intended. |
+
+
+ qac-3004 |
+ This integral constant expression is being interpreted as a null pointer constant. |
+
+
+ qac-3344 |
+ Controlling expression is not an 'essentially Boolean' expression. |
+
+
+ |
+
+
+ EXP19 |
+ Recommendation |
+ Use braces for the body of an if, for, or while statement |
+
+ Qac | Description |
+
+ qac-2212 |
+ Body of control statement is not enclosed within braces. |
+
+
+ |
+
+
+ EXP20 |
+ Recommendation |
+ Perform explicit tests to determine success, true and false, and equality |
+
+ Qac | Description |
+
+ qac-3344 |
+ Controlling expression is not an 'essentially Boolean' expression. |
+
+
+ qac-4116 |
+ Operand of logical ! operator is not an 'essentially Boolean' expression. |
+
+
+ |
+
+
+ EXP30 |
+ Rule |
+ Do not depend on the order of evaluation for side effects |
+
+ Qac | Description |
+
+ qac-0400 |
+ [U] '%1s' is modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0401 |
+ [U] '%1s' may be modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0402 |
+ [U] '%1s' is modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0403 |
+ [U] '%1s' may be modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0404 |
+ [U] More than one read access to volatile objects between sequence points. |
+
+
+ qac-0405 |
+ [U] More than one modification of volatile objects between sequence points. |
+
+
+ |
+
+
+ EXP32 |
+ Rule |
+ Do not access a volatile object through a nonvolatile reference |
+
+ Qac | Description |
+
+ qac-0312 |
+ Dangerous pointer cast results in loss of volatile qualification. |
+
+
+ qac-0562 |
+ [C] Right operand of assignment points to a more heavily qualified type. |
+
+
+ qac-0563 |
+ [C] Right operand of assignment is not of compatible pointer type. |
+
+
+ qac-0673 |
+ [C] Initializer points to a more heavily qualified type. |
+
+
+ qac-0674 |
+ [C] Initializer for pointer is of incompatible type. |
+
+
+ |
+
+
+ EXP33 |
+ Rule |
+ Do not read uninitialized memory |
+
+ Qac | Description |
+
+ qac-2726 |
+ Definite: Use of uninitialized resource. |
+
+
+ qac-2727 |
+ Apparent: Use of uninitialized resource. |
+
+
+ qac-2728 |
+ Suspicious: Use of uninitialized resource. |
+
+
+ qac-2961 |
+ Definite: Using value of uninitialized automatic object '%s'. |
+
+
+ qac-2962 |
+ Apparent: Using value of uninitialized automatic object '%s'. |
+
+
+ qac-2963 |
+ Suspicious: Using value of uninitialized automatic object '%s'. |
+
+
+ qac-2966 |
+ Definite: Some members of object '%s' are uninitialized. |
+
+
+ qac-2967 |
+ Apparent: Some members of object '%s' are uninitialized. |
+
+
+ qac-2968 |
+ Suspicious: Some members of object '%s' are uninitialized. |
+
+
+ qac-2971 |
+ Definite: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ qac-2972 |
+ Apparent: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ qac-2973 |
+ Suspicious: Passing address of uninitialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ qac-2976 |
+ Definite: Passing address of partially initialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ qac-2977 |
+ Apparent: Passing address of partially initialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ qac-2978 |
+ Suspicious: Passing address of partially initialized object '%s' to a function parameter declared as a pointer to const. |
+
+
+ |
+
+
+ EXP34 |
+ Rule |
+ Do not dereference null pointers |
+
+ Qac | Description |
+
+ qac-2810 |
+ Constant: Dereference of NULL pointer. |
+
+
+ qac-2811 |
+ Definite: Dereference of NULL pointer. |
+
+
+ qac-2812 |
+ Apparent: Dereference of NULL pointer. |
+
+
+ qac-2813 |
+ Suspicious: Dereference of NULL pointer. |
+
+
+ |
+
+
+ EXP35 |
+ Rule |
+ Do not modify objects with temporary lifetime |
+
+ Qac | Description |
+
+ qac-0450 |
+ [U] Passing an array with temporary lifetime as a function parameter. |
+
+
+ qac-0455 |
+ [U] Passing an array with temporary lifetime as a constant function parameter. |
+
+
+ qac-0459 |
+ [U] Modifying the contents of an array with temporary lifetime. |
+
+
+ qac-0464 |
+ [U] Storing a pointer to an array with temporary lifetime. |
+
+
+ qac-0465 |
+ [U] Returning a pointer to an array with temporary lifetime. |
+
+
+ |
+
+
+ EXP36 |
+ Rule |
+ Do not cast pointers into more strictly aligned pointer types |
+
+ Qac | Description |
+
+ qac-0326 |
+ [I] Cast between a pointer to void and an integral type. |
+
+
+ qac-3305 |
+ Pointer cast to stricter alignment. |
+
+
+ |
+
+
+ EXP37 |
+ Rule |
+ Call functions with the correct number and type of arguments |
+
+ Qac | Description |
+
+ qac-1331 |
+ Type or number of arguments doesn't match previous use of the function. |
+
+
+ qac-1332 |
+ Type or number of arguments doesn't match prototype found later. |
+
+
+ qac-1333 |
+ Type or number of arguments doesn't match function definition found later. |
+
+
+ qac-3002 |
+ Defining '%1s()' with an identifier list and separate parameter declarations is an obsolescent feature. |
+
+
+ qac-3320 |
+ Type of argument no. %s differs from its type in definition of function. |
+
+
+ qac-3335 |
+ No function declaration. Implicit declaration inserted: 'extern int %s();'. |
+
+
+ |
+
+
+ EXP39 |
+ Rule |
+ Do not access a variable through a pointer of an incompatible type |
+
+ Qac | Description |
+
+ qac-0310 |
+ Casting to different object pointer type. |
+
+
+ qac-0751 |
+ Casting to char pointer type. |
+
+
+ qac-3305 |
+ Pointer cast to stricter alignment. |
+
+
+ |
+
+
+ EXP40 |
+ Rule |
+ Do not modify constant objects |
+
+ Qac | Description |
+
+ qac-0563 |
+ [C] Right operand of assignment is not of compatible pointer type. |
+
+
+ |
+
+
+ EXP42 |
+ Rule |
+ Do not compare padding data |
+
+ Qac | Description |
+
+ qac-4726 |
+ Definite: Comparison of padding bits that are not part of the object representation. |
+
+
+ qac-4727 |
+ Apparent: Comparison of padding bits that are not part of the object representation. |
+
+
+ qac-4728 |
+ Suspicious: Comparison of padding bits that are not part of the object representation. |
+
+
+ qac-4729 |
+ Possible: Comparison of padding bits that are not part of the object representation. |
+
+
+ |
+
+
+ EXP43 |
+ Rule |
+ Avoid undefined behavior when using restrict-qualified pointers |
+
+ Qac | Description |
+
+ qac-1057 |
+ [C99] The keyword 'restrict' has been used. |
+
+
+ |
+
+
+ EXP44 |
+ Rule |
+ Do not rely on side effects in operands to sizeof, _Alignof, or _Generic |
+
+ Qac | Description |
+
+ qac-3307 |
+ The operand of 'sizeof' is an expression with implied side effects, but they will not be evaluated. |
+
+
+ |
+
+
+ EXP45 |
+ Rule |
+ Do not perform assignments in selection statements |
+
+ Qac | Description |
+
+ qac-3314 |
+ This controlling expression is an assignment. |
+
+
+ qac-3326 |
+ The result of an assignment is being used in a logical operation. |
+
+
+ qac-3344 |
+ Controlling expression is not an 'essentially Boolean' expression. |
+
+
+ qac-3416 |
+ Logical operation performed on expression with persistent side effects. |
+
+
+ |
+
+
+ EXP46 |
+ Rule |
+ Do not use a bitwise operator with a Boolean-like operand |
+
+ Qac | Description |
+
+ qac-3344 |
+ Controlling expression is not an 'essentially Boolean' expression. |
+
+
+ qac-4502 |
+ An expression of 'essentially Boolean' type (%1s) is being used as the %2s operand of this bitwise operator (%3s). |
+
+
+ |
+
+
+ EXP47 |
+ Rule |
+ Do not call va_arg with an argument of the incorrect type |
+
+ Qac | Description |
+
+ qac-4901 |
+ Definite: Invalid call to va_arg. |
+
+
+ qac-4902 |
+ Apparent: Invalid call to va_arg. |
+
+
+ qac-4903 |
+ Suspicious: Invalid call to va_arg. |
+
+
+ qac-4904 |
+ Possible: Invalid call to va_arg. |
+
+
+ |
+
+
+ FIO01 |
+ Recommendation |
+ Be careful using functions that use file names for identification |
+
+ Qac | Description |
+
+ certccm-5011 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO03 |
+ Recommendation |
+ Do not make assumptions about fopen() and file creation |
+
+ Qac | Description |
+
+ certccm-5012 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO06 |
+ Recommendation |
+ Create files with appropriate access permissions |
+
+ Qac | Description |
+
+ certccm-5013 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO08 |
+ Recommendation |
+ Take care when calling remove() on an open file |
+
+ Qac | Description |
+
+ certccm-5014 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO10 |
+ Recommendation |
+ Take care when using the rename() function |
+
+ Qac | Description |
+
+ certccm-5015 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO21 |
+ Recommendation |
+ Do not create temporary files in shared directories |
+
+ Qac | Description |
+
+ certccm-5016 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO30 |
+ Rule |
+ Exclude user input from format strings |
+
+ Qac | Description |
+
+ qac-4916 |
+ Definite: Using a tainted variable as format string. |
+
+
+ qac-4917 |
+ Apparent: Using a tainted variable as format string. |
+
+
+ qac-4918 |
+ Suspicious: Using a tainted variable as format string. |
+
+
+ |
+
+
+ FIO32 |
+ Rule |
+ Do not perform operations on devices that are only appropriate for files |
+
+ Qac | Description |
+
+ qac-4921 |
+ Definite: Using a tainted variable as a device name when opening a device that could be a file. |
+
+
+ qac-4922 |
+ Apparent: Using a tainted variable as a device name when opening a device that could be a file. |
+
+
+ qac-4923 |
+ Suspicious: Using a tainted variable as a device name when opening a device that could be a file. |
+
+
+ |
+
+
+ FIO34 |
+ Rule |
+ Distinguish between characters read from a file and EOF or WEOF |
+
+ Qac | Description |
+
+ qac-2676 |
+ Definite: The value originating from an EOF returning function was modified before being compared with macro EOF. |
+
+
+ qac-2678 |
+ Suspicious: The value originating from an EOF returning function was modified before being compared with macro EOF. |
+
+
+ |
+
+
+ FIO37 |
+ Rule |
+ Do not assume that fgets() or fgetws() returns a nonempty string when successful |
+
+ Qac | Description |
+
+ qac-4911 |
+ Definite: Assuming that fgets or fgetws returned a non empty string. |
+
+
+ qac-4912 |
+ Apparent: Assuming that fgets or fgetws returned a non empty string. |
+
+
+ qac-4913 |
+ Suspicious: Assuming that fgets or fgetws returned a non empty string. |
+
+
+ |
+
+
+ FIO38 |
+ Rule |
+ Do not copy a FILE object |
+
+ Qac | Description |
+
+ qac-1485 |
+ A pointer to a FILE object is dereferenced. |
+
+
+ certccm-5028 |
+ Copy of a FILE object. |
+
+
+ |
+
+
+ FIO39 |
+ Rule |
+ Do not alternately input and output from a stream without an intervening flush or positioning call |
+
+ Qac | Description |
+
+ qac-4711 |
+ Definite: Alternating I/O operations on a file stream found without an intervening positioning call or EOF. |
+
+
+ qac-4712 |
+ Apparent: Alternating I/O operations on a file stream found without an intervening positioning call or EOF. |
+
+
+ qac-4713 |
+ Suspicious: Alternating I/O operations on a file stream found without an intervening positioning call or EOF. |
+
+
+ |
+
+
+ FIO40 |
+ Rule |
+ Reset strings on fgets() or fgetws() failure |
+
+ Qac | Description |
+
+ qac-4861 |
+ Definite: Using an array containing indeterminate values after a call to fgets or fgetws. |
+
+
+ qac-4862 |
+ Apparent: Using an array containing indeterminate values after a call to fgets or fgetws. |
+
+
+ qac-4863 |
+ Suspicious: Using an array containing indeterminate values after a call to fgets or fgetws. |
+
+
+ |
+
+
+ FIO41 |
+ Rule |
+ Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects |
+
+ Qac | Description |
+
+ certccm-5036 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FIO42 |
+ Rule |
+ Close files when they are no longer needed |
+
+ Qac | Description |
+
+ qac-2701 |
+ Definite: Opened file is not closed. |
+
+
+ qac-2702 |
+ Apparent: Opened file is not closed. |
+
+
+ qac-2703 |
+ Suspicious: Opened file is not closed. |
+
+
+ |
+
+
+ FIO44 |
+ Rule |
+ Only use values for fsetpos() that are returned from fgetpos() |
+
+ Qac | Description |
+
+ qac-4841 |
+ Definite: Passing a file position argument to fsetpos() not obtained from fgetpos(). |
+
+
+ qac-4842 |
+ Apparent: Passing a file position argument to fsetpos() not obtained from fgetpos(). |
+
+
+ qac-4843 |
+ Suspicious: Passing a file position argument to fsetpos() not obtained from fgetpos(). |
+
+
+ |
+
+
+ FIO45 |
+ Rule |
+ Avoid TOCTOU race conditions while accessing files |
+
+ Qac | Description |
+
+ qac-4851 |
+ Definite: File access time-of-check time-of-use race condition. |
+
+
+ qac-4852 |
+ Apparent: File access time-of-check time-of-use race condition. |
+
+
+ qac-4853 |
+ Suspicious: File access time-of-check time-of-use race condition. |
+
+
+ |
+
+
+ FIO46 |
+ Rule |
+ Do not access a closed file |
+
+ Qac | Description |
+
+ qac-2696 |
+ Definite: Attempt to access a file which has been closed. |
+
+
+ qac-2697 |
+ Apparent: Attempt to access a file which has been closed. |
+
+
+ qac-2698 |
+ Suspicious: Attempt to access a file which has been closed. |
+
+
+ |
+
+
+ FIO47 |
+ Rule |
+ Use valid format strings |
+
+ Qac | Description |
+
+ qac-0161 |
+ [U] Unknown length modifier used with 'i' or 'd' conversion specifier, number %1s. |
+
+
+ qac-0162 |
+ [U] Unknown length modifier used with 'o' conversion specifier, number %1s. |
+
+
+ qac-0163 |
+ [U] Unknown length modifier used with 'u' conversion specifier, number %1s. |
+
+
+ qac-0164 |
+ [U] Unknown length modifier used with 'x' conversion specifier, number %1s. |
+
+
+ qac-0165 |
+ [U] Unknown length modifier used with 'X' conversion specifier, number %1s. |
+
+
+ qac-0166 |
+ [U] Unknown length modifier used with 'f' conversion specifier, number %1s. |
+
+
+ qac-0167 |
+ [U] Unknown length modifier used with 'e' conversion specifier, number %1s. |
+
+
+ qac-0168 |
+ [U] Unknown length modifier used with 'E' conversion specifier, number %1s. |
+
+
+ qac-0169 |
+ [U] Unknown length modifier used with 'g' conversion specifier, number %1s. |
+
+
+ qac-0170 |
+ [U] Unknown length modifier used with 'G' conversion specifier, number %1s. |
+
+
+ qac-0171 |
+ [U] Unknown length modifier used with 'c' conversion specifier, number %1s. |
+
+
+ qac-0172 |
+ [U] Unknown length modifier used with '%%' conversion specifier, number %1s. |
+
+
+ qac-0173 |
+ [U] Unknown length modifier used with 's' conversion specifier, number %1s. |
+
+
+ qac-0174 |
+ [U] Unknown length modifier used with 'n' conversion specifier, number %1s. |
+
+
+ qac-0175 |
+ [U] Unknown length modifier used with 'p' conversion specifier, number %1s. |
+
+
+ qac-0176 |
+ [U] Incomplete conversion specifier, number %1s. |
+
+
+ qac-0177 |
+ [U] Field width of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0178 |
+ [U] Precision of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0179 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0180 |
+ [C99] Use of ll for conversion specifier. |
+
+
+ qac-0184 |
+ [U] Insufficient arguments to satisfy conversion specifier, number %1s. |
+
+
+ qac-0185 |
+ [U] Call contains more arguments than conversion specifiers. |
+
+
+ qac-0190 |
+ [U] Using unsupported conversion specifier number %1s. |
+
+
+ qac-0191 |
+ [U] Unknown length modifier used with 'd/i/n' conversion specifier, number %1s. |
+
+
+ qac-0192 |
+ [U] Unknown length modifier used with 'o' conversion specifier, number %1s. |
+
+
+ qac-0193 |
+ [U] Unknown length modifier used with 'u' conversion specifier, number %1s. |
+
+
+ qac-0194 |
+ [U] Unknown length modifier used with 'x/X' conversion specifier, number %1s. |
+
+
+ qac-0195 |
+ [U] Unknown length modifier used with 'e/E/f/F/g/G' conversion specifier, number %1s. |
+
+
+ qac-0196 |
+ [U] Unknown length modifier used with 's' conversion specifier, number %1s. |
+
+
+ qac-0197 |
+ [U] Unknown length modifier used with 'p' conversion specifier, number %1s. |
+
+
+ qac-0198 |
+ [U] Unknown length modifier used with '%%' conversion specifier, number %1s. |
+
+
+ qac-0199 |
+ [U] Unknown length modifier used with '[' conversion specifier, number %1s. |
+
+
+ qac-0200 |
+ [U] Unknown length modifier used with 'c' conversion specifier, number %1s. |
+
+
+ qac-0201 |
+ [U] Incomplete conversion specifier, number %1s. |
+
+
+ qac-0202 |
+ [I] '-' character in '[]' conversion specification is implementation defined. |
+
+
+ qac-0204 |
+ [U] Field width of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0206 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0209 |
+ [U] Using a non-constant format string. |
+
+
+ |
+
+
+ FLP02 |
+ Recommendation |
+ Avoid using floating-point numbers when precise computation is needed |
+
+ Qac | Description |
+
+ qac-0790 |
+ This translation unit makes use of floating types. |
+
+
+ |
+
+
+ FLP06 |
+ Recommendation |
+ Convert integers to floating point for floating point operations |
+
+ Qac | Description |
+
+ qac-4117 |
+ Result of integer division operation implicitly converted to a floating type. |
+
+
+ qac-4118 |
+ Result of integer division operation cast to a floating type. |
+
+
+ |
+
+
+ FLP30 |
+ Rule |
+ Do not use floating-point variables as loop counters |
+
+ Qac | Description |
+
+ qac-3339 |
+ Floating point variable used as 'while' loop control variable. |
+
+
+ qac-3340 |
+ Floating point variable used as 'for' loop control variable. |
+
+
+ qac-3342 |
+ Controlling expression of 'for' loop is a floating point comparison. |
+
+
+ |
+
+
+ FLP32 |
+ Rule |
+ Prevent or detect domain and range errors in math functions |
+
+ Qac | Description |
+
+ certccm-5025 |
+ '%s' is being used. |
+
+
+ |
+
+
+ FLP34 |
+ Rule |
+ Ensure that floating-point conversions are within range of the new type |
+
+ Qac | Description |
+
+ qac-4450 |
+ An expression of 'essentially floating' type (%1s) is being converted to Boolean type, '%2s' on assignment. |
+
+
+ qac-4451 |
+ An expression of 'essentially floating' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4452 |
+ An expression of 'essentially floating' type (%1s) is being converted to enum type, '%2s' on assignment. |
+
+
+ qac-4453 |
+ An expression of 'essentially floating' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4454 |
+ An expression of 'essentially floating' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4462 |
+ A non-constant expression of 'essentially floating' type (%1s) is being converted to narrower floating type, '%2s' on assignment. |
+
+
+ qac-4465 |
+ A constant expression of 'essentially floating' type (%1s) is being converted to narrower floating type, '%2s' on assignment. |
+
+
+ |
+
+
+ FLP36 |
+ Rule |
+ Preserve precision when converting integral values to floating-point type |
+
+ Qac | Description |
+
+ qac-1260 |
+ Integer constant implicitly converted to a floating type. |
+
+
+ qac-1263 |
+ Floating constant causes implicit conversion of other (integral) operand. |
+
+
+ qac-1298 |
+ An integer constant of 'essentially signed' type is being converted to floating type on assignment. |
+
+
+ qac-1299 |
+ An integer constant of 'essentially unsigned' type is being converted to floating type on assignment. |
+
+
+ qac-1800 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this arithmetic operation. |
+
+
+ qac-1802 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this relational operation. |
+
+
+ qac-1803 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this equality operation. |
+
+
+ qac-1804 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this conditional operation. |
+
+
+ qac-4117 |
+ Result of integer division operation implicitly converted to a floating type. |
+
+
+ qac-4435 |
+ A non-constant expression of 'essentially signed' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4437 |
+ A constant expression of 'essentially signed' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4445 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ |
+
+
+ FLP37 |
+ Rule |
+ Do not use object representations to compare floating-point values |
+
+ Qac | Description |
+
+ certccm-5026 |
+ Incorrect floating point value comparison. |
+
+
+ |
+
+
+ INT02 |
+ Recommendation |
+ Understand integer conversion rules |
+
+ Qac | Description |
+
+ qac-1250 |
+ Unsuffixed integer constant causes implicit conversion of other operand. |
+
+
+ qac-1251 |
+ Suffixed integer constant causes implicit conversion of other operand. |
+
+
+ qac-1252 |
+ Suffixed integer constant implicitly converted to different integer type. |
+
+
+ qac-1253 |
+ Unsuffixed integer constant implicitly converted to different integer type. |
+
+
+ qac-1256 |
+ An integer constant suffixed with L is being converted to type signed or unsigned long long on assignment. |
+
+
+ qac-1257 |
+ An integer constant suffixed with L or LL is being converted to a type of lower rank on assignment. |
+
+
+ qac-1260 |
+ Integer constant implicitly converted to a floating type. |
+
+
+ qac-1263 |
+ Floating constant causes implicit conversion of other (integral) operand. |
+
+
+ qac-1266 |
+ A floating constant is being converted to integral type on assignment. |
+
+
+ qac-1274 |
+ Unsuffixed floating constant causes implicit conversion of other (floating) operand. |
+
+
+ qac-1290 |
+ An integer constant of 'essentially signed' type is being converted to unsigned type on assignment. |
+
+
+ qac-1291 |
+ An integer constant of 'essentially unsigned' type is being converted to signed type on assignment. |
+
+
+ qac-1292 |
+ An integer constant of 'essentially signed' type is being converted to type char on assignment. |
+
+
+ qac-1293 |
+ An integer constant of 'essentially unsigned' type is being converted to type char on assignment. |
+
+
+ qac-1294 |
+ An integer constant of 'essentially signed' type is being converted to type _Bool on assignment. |
+
+
+ qac-1295 |
+ An integer constant of 'essentially unsigned' type is being converted to type _Bool on assignment. |
+
+
+ qac-1296 |
+ An integer constant of 'essentially signed' type is being converted to enum type on assignment. |
+
+
+ qac-1297 |
+ An integer constant of 'essentially unsigned' type is being converted to enum type on assignment. |
+
+
+ qac-1298 |
+ An integer constant of 'essentially signed' type is being converted to floating type on assignment. |
+
+
+ qac-1299 |
+ An integer constant of 'essentially unsigned' type is being converted to floating type on assignment. |
+
+
+ qac-1800 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this arithmetic operation. |
+
+
+ qac-1802 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this relational operation. |
+
+
+ qac-1803 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this equality operation. |
+
+
+ qac-1804 |
+ The %1s operand (essential type: '%2s') will be implicitly converted to a floating type, '%3s', in this conditional operation. |
+
+
+ qac-1810 |
+ An operand of 'essentially character' type is being added to another operand of 'essentially character' type. |
+
+
+ qac-1811 |
+ An operand of 'essentially character' type is being subtracted from an operand of 'essentially signed' type. |
+
+
+ qac-1812 |
+ An operand of 'essentially character' type is being subtracted from an operand of 'essentially unsigned' type. |
+
+
+ qac-1813 |
+ An operand of 'essentially character' type is being balanced with an operand of 'essentially floating' type in this arithmetic operation. |
+
+
+ qac-1820 |
+ The %1s operand is non-constant and 'essentially signed' (%2s) but will be implicitly converted to an unsigned type (%3s) in this arithmetic operation. |
+
+
+ qac-1821 |
+ The %1s operand is non-constant and 'essentially signed' (%2s) but will be implicitly converted to an unsigned type (%3s) in this bitwise operation. |
+
+
+ qac-1822 |
+ The %1s operand is non-constant and 'essentially signed' (%2s) but will be implicitly converted to an unsigned type (%3s) in this relational operation. |
+
+
+ qac-1823 |
+ The %1s operand is non-constant and 'essentially signed' (%2s) but will be implicitly converted to an unsigned type (%3s) in this equality operation. |
+
+
+ qac-1824 |
+ The %1s operand is non-constant and 'essentially signed' (%2s) but will be implicitly converted to an unsigned type (%3s) in this conditional operation. |
+
+
+ qac-1830 |
+ The %1s operand is constant, 'essentially signed' (%2s) and negative but will be implicitly converted to an unsigned type (%3s) in this arithmetic operation. |
+
+
+ qac-1831 |
+ The %1s operand is constant, 'essentially signed' (%2s) and negative but will be implicitly converted to an unsigned type (%3s) in this bitwise operation. |
+
+
+ qac-1832 |
+ The %1s operand is constant, 'essentially signed' (%2s) and negative but will be implicitly converted to an unsigned type (%3s) in this relational operation. |
+
+
+ qac-1833 |
+ The %1s operand is constant, 'essentially signed' (%2s) and negative but will be implicitly converted to an unsigned type (%3s) in this equality operation. |
+
+
+ qac-1834 |
+ The %1s operand is constant, 'essentially signed' (%2s) and negative but will be implicitly converted to an unsigned type (%3s) in this conditional operation. |
+
+
+ qac-1840 |
+ The %1s operand is constant, 'essentially signed' (%2s) and non-negative but will be implicitly converted to an unsigned type (%3s) in this arithmetic operation. |
+
+
+ qac-1841 |
+ The %1s operand is constant, 'essentially signed' (%2s) and non-negative but will be implicitly converted to an unsigned type (%3s) in this bitwise operation. |
+
+
+ qac-1842 |
+ The %1s operand is constant, 'essentially signed' (%2s) and non-negative but will be implicitly converted to an unsigned type (%3s) in this relational operation. |
+
+
+ qac-1843 |
+ The %1s operand is constant, 'essentially signed' (%2s) and non-negative but will be implicitly converted to an unsigned type (%3s) in this equality operation. |
+
+
+ qac-1844 |
+ The %1s operand is constant, 'essentially signed' (%2s) and non-negative but will be implicitly converted to an unsigned type (%3s) in this conditional operation. |
+
+
+ qac-1850 |
+ The %1s operand is 'essentially unsigned' (%2s) but will be implicitly converted to a signed type (%3s) in this arithmetic operation. |
+
+
+ qac-1851 |
+ The %1s operand is 'essentially unsigned' (%2s) but will be implicitly converted to a signed type (%3s) in this bitwise operation. |
+
+
+ qac-1852 |
+ The %1s operand is 'essentially unsigned' (%2s) but will be implicitly converted to a signed type (%3s) in this relational operation. |
+
+
+ qac-1853 |
+ The %1s operand is 'essentially unsigned' (%2s) but will be implicitly converted to a signed type (%3s) in this equality operation. |
+
+
+ qac-1854 |
+ The %1s operand is 'essentially unsigned' (%2s) but will be implicitly converted to a signed type (%3s) in this conditional operation. |
+
+
+ qac-1860 |
+ The operands of this arithmetic operator are of different 'essential signedness' but will generate a result of type 'signed int'. |
+
+
+ qac-1861 |
+ The operands of this bitwise operator are of different 'essential signedness' but will generate a result of type 'signed int'. |
+
+
+ qac-1862 |
+ The operands of this relational operator are of different 'essential signedness' but will both be promoted to 'signed int' for comparison. |
+
+
+ qac-1863 |
+ The operands of this equality operator are of different 'essential signedness' but will both be promoted to 'signed int' for comparison. |
+
+
+ qac-1864 |
+ The 2nd and 3rd operands of this conditional operator are of different 'essential signedness'. The result will be in the promoted type 'signed int'. |
+
+
+ qac-1880 |
+ The operands of this relational operator are expressions of different 'essential type' categories (%1s and %2s). |
+
+
+ qac-1881 |
+ The operands of this equality operator are expressions of different 'essential type' categories (%1s and %2s). |
+
+
+ qac-1882 |
+ The 2nd and 3rd operands of this conditional operator are expressions of different 'essential type' categories (%1s and %2s). |
+
+
+ qac-2100 |
+ Integral promotion : unsigned char promoted to signed int. |
+
+
+ qac-2101 |
+ Integral promotion : unsigned short promoted to signed int. |
+
+
+ qac-2102 |
+ Integral promotion : unsigned char promoted to unsigned int. |
+
+
+ qac-2103 |
+ Integral promotion : unsigned short promoted to unsigned int. |
+
+
+ qac-2104 |
+ Integral promotion : signed char promoted to signed int. |
+
+
+ qac-2105 |
+ Integral promotion : signed short promoted to signed int. |
+
+
+ qac-2106 |
+ Integral promotion : plain char promoted to signed int. |
+
+
+ qac-2107 |
+ Integral promotion : plain char promoted to unsigned int. |
+
+
+ qac-2109 |
+ Integral promotion : _Bool promoted to signed int. |
+
+
+ qac-2110 |
+ Default argument promotion : unsigned char promoted to signed int. |
+
+
+ qac-2111 |
+ Default argument promotion : unsigned short promoted to signed int. |
+
+
+ qac-2112 |
+ Default argument promotion : unsigned char promoted to unsigned int. |
+
+
+ qac-2113 |
+ Default argument promotion : unsigned short promoted to unsigned int. |
+
+
+ qac-2114 |
+ Default argument promotion : signed char promoted to signed int. |
+
+
+ qac-2115 |
+ Default argument promotion : signed short promoted to signed int. |
+
+
+ qac-2116 |
+ Default argument promotion : plain char promoted to signed int. |
+
+
+ qac-2117 |
+ Default argument promotion : plain char promoted to unsigned int. |
+
+
+ qac-2118 |
+ Default argument promotion : float promoted to double. |
+
+
+ qac-2119 |
+ Default argument promotion : _Bool promoted to signed int. |
+
+
+ qac-2120 |
+ Integral promotion : unsigned bit-field promoted to signed int. |
+
+
+ qac-2122 |
+ Integral promotion : unsigned bit-field promoted to unsigned int. |
+
+
+ qac-2124 |
+ Integral promotion : signed bit-field promoted to signed int. |
+
+
+ qac-2130 |
+ Default argument promotion : unsigned bit-field promoted to signed int. |
+
+
+ qac-2132 |
+ Default argument promotion : unsigned bit-field promoted to unsigned int. |
+
+
+ qac-2134 |
+ Default argument promotion : signed bit-field promoted to signed int. |
+
+
+ qac-4401 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4402 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to enum type, '%2s' on assignment. |
+
+
+ qac-4403 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4404 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4405 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4410 |
+ An expression of 'essentially character' type (%1s) is being converted to Boolean type, '%2s' on assignment. |
+
+
+ qac-4412 |
+ An expression of 'essentially character' type (%1s) is being converted to enum type, '%2s' on assignment. |
+
+
+ qac-4413 |
+ An expression of 'essentially character' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4414 |
+ An expression of 'essentially character' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4415 |
+ An expression of 'essentially character' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4420 |
+ An expression of 'essentially enum' type (%1s) is being converted to Boolean type, '%2s' on assignment. |
+
+
+ qac-4421 |
+ An expression of 'essentially enum' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4422 |
+ An expression of 'essentially enum' type (%1s) is being converted to a different enum type, '%2s' on assignment. |
+
+
+ qac-4423 |
+ An expression of 'essentially enum' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4424 |
+ An expression of 'essentially enum' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4425 |
+ An expression of 'essentially enum' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4430 |
+ An expression of 'essentially signed' type (%1s) is being converted to Boolean type, '%2s' on assignment. |
+
+
+ qac-4431 |
+ An expression of 'essentially signed' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4432 |
+ An expression of 'essentially signed' type (%1s) is being converted to enum type, '%2s' on assignment. |
+
+
+ qac-4434 |
+ A non-constant expression of 'essentially signed' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4435 |
+ A non-constant expression of 'essentially signed' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4436 |
+ A constant expression of 'essentially signed' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ qac-4437 |
+ A constant expression of 'essentially signed' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4440 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to Boolean type, '%2s' on assignment. |
+
+
+ qac-4441 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4442 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to enum type, '%2s' on assignment. |
+
+
+ qac-4443 |
+ A non-constant expression of 'essentially unsigned' type (%1s) is being converted to a wider signed type, '%2s' on assignment. |
+
+
+ qac-4445 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to floating type, '%2s' on assignment. |
+
+
+ qac-4446 |
+ A non-constant expression of 'essentially unsigned' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4447 |
+ A constant expression of 'essentially unsigned' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4460 |
+ A non-constant expression of 'essentially signed' type (%1s) is being converted to narrower signed type, '%2s' on assignment. |
+
+
+ qac-4461 |
+ A non-constant expression of 'essentially unsigned' type (%1s) is being converted to narrower unsigned type, '%2s' on assignment. |
+
+
+ qac-4463 |
+ A constant expression of 'essentially signed' type (%1s) is being converted to narrower signed type, '%2s' on assignment. |
+
+
+ qac-4464 |
+ A constant expression of 'essentially unsigned' type (%1s) is being converted to narrower unsigned type, '%2s' on assignment. |
+
+
+ qac-4470 |
+ A non-constant expression of 'essentially signed' type (%1s) is being passed to a function parameter of wider signed type, '%2s'. |
+
+
+ qac-4471 |
+ A non-constant expression of 'essentially unsigned' type (%1s) is being passed to a function parameter of wider unsigned type, '%2s'. |
+
+
+ qac-4480 |
+ A non-constant expression of 'essentially signed' type (%1s) is being returned from a function defined with a wider signed return type, '%2s'. |
+
+
+ qac-4481 |
+ A non-constant expression of 'essentially unsigned' type (%1s) is being returned from a function defined with a wider unsigned return type, '%2s'. |
+
+
+ |
+
+
+ INT04 |
+ Recommendation |
+ Enforce limits on integer values originating from tainted sources |
+
+ Qac | Description |
+
+ qac-2794 |
+ Possible: Tainted right hand operand of shift operator is negative or too large. |
+
+
+ qac-2804 |
+ Possible: Overflow in signed arithmetic tainted operation. |
+
+
+ qac-2854 |
+ Possible: Implicit conversion of a tainted expression to a signed integer type of insufficient size. |
+
+
+ qac-2859 |
+ Possible: Casting a tainted expression to a signed integer type of insufficient size. |
+
+
+ qac-2864 |
+ Possible: Implementation-defined value resulting from left shift operation on tainted expression of signed type. |
+
+
+ qac-2894 |
+ Possible: Negative tainted value implicitly converted to an unsigned type. |
+
+
+ qac-2899 |
+ Possible: Negative tainted value cast to an unsigned type. |
+
+
+ qac-2904 |
+ Possible: Positive integer tainted value truncated by implicit conversion to a smaller unsigned type. |
+
+
+ qac-2909 |
+ Possible: Positive integer tainted value truncated by cast to a smaller unsigned type. |
+
+
+ qac-2914 |
+ Possible: Wraparound in unsigned arithmetic tainted operation. |
+
+
+ qac-2924 |
+ Possible: Left shift operation on tainted expression of unsigned type results in loss of high order bits. |
+
+
+ qac-2944 |
+ Possible: Result of implicit conversion of a tainted expression is only representable in a two's complement implementation. |
+
+
+ qac-2949 |
+ Possible: Result of cast of a tainted expression is only representable in a two's complement implementation. |
+
+
+ qac-2954 |
+ Possible: Negative tainted value used in array subscript or pointer arithmetic operation. |
+
+
+ qac-2956 |
+ Definite: Using object '%s' with tainted value. |
+
+
+ qac-2959 |
+ Possible: Using object '%s' with tainted value. |
+
+
+ |
+
+
+ INT05 |
+ Recommendation |
+ Do not use input functions to convert character data if they cannot handle all possible inputs |
+
+ Qac | Description |
+
+ certccm-5005 |
+ '%s' is being used. |
+
+
+ |
+
+
+ INT07 |
+ Recommendation |
+ Use only explicitly signed or unsigned char type for numeric values |
+
+ Qac | Description |
+
+ qac-1292 |
+ An integer constant of 'essentially signed' type is being converted to type char on assignment. |
+
+
+ qac-1293 |
+ An integer constant of 'essentially unsigned' type is being converted to type char on assignment. |
+
+
+ qac-4401 |
+ An expression of 'essentially Boolean' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4421 |
+ An expression of 'essentially enum' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4431 |
+ An expression of 'essentially signed' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4441 |
+ An expression of 'essentially unsigned' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ qac-4451 |
+ An expression of 'essentially floating' type (%1s) is being converted to character type, '%2s' on assignment. |
+
+
+ |
+
+
+ INT08 |
+ Recommendation |
+ Verify that all integer values are in range |
+
+ Qac | Description |
+
+ qac-2800 |
+ Constant: Overflow in signed arithmetic operation. |
+
+
+ qac-2801 |
+ Definite: Overflow in signed arithmetic operation. |
+
+
+ qac-2802 |
+ Apparent: Overflow in signed arithmetic operation. |
+
+
+ qac-2803 |
+ Suspicious: Overflow in signed arithmetic operation. |
+
+
+ qac-2910 |
+ Constant: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2911 |
+ Definite: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2912 |
+ Apparent: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2913 |
+ Suspicious: Wraparound in unsigned arithmetic operation. |
+
+
+ |
+
+
+ INT09 |
+ Recommendation |
+ Ensure enumeration constants map to unique values |
+
+ Qac | Description |
+
+ qac-0724 |
+ The value of this implicitly-specified enumeration constant is not unique. |
+
+
+ |
+
+
+ INT10 |
+ Recommendation |
+ Do not assume a positive remainder when using the % operator |
+
+ Qac | Description |
+
+ qac-3103 |
+ Result of signed division or remainder operation may be implementation defined. |
+
+
+ |
+
+
+ INT12 |
+ Recommendation |
+ Do not make assumptions about the type of a plain int bit-field when used in an expression |
+
+ Qac | Description |
+
+ qac-0634 |
+ [I] Bit-field %1s in %2s has not been declared explicitly as unsigned or signed. |
+
+
+ qac-0635 |
+ [C99] Bit-field %1s in %2s has been declared with a type not explicitly supported. |
+
+
+ |
+
+
+ INT13 |
+ Recommendation |
+ Use bitwise operators only on unsigned operands |
+
+ Qac | Description |
+
+ qac-4532 |
+ An expression of 'essentially signed' type (%1s) is being used as the %2s operand of this bitwise operator (%3s). |
+
+
+ qac-4533 |
+ An expression of 'essentially signed' type (%1s) is being used as the left-hand operand of this shift operator (%2s). |
+
+
+ qac-4534 |
+ An expression of 'essentially signed' type (%1s) is being used as the right-hand operand of this shift operator (%2s). |
+
+
+ qac-4543 |
+ A non-negative constant expression of 'essentially signed' type (%1s) is being used as the left-hand operand of this shift operator (%2s). |
+
+
+ qac-4544 |
+ A non-negative constant expression of 'essentially signed' type (%1s) is being used as the right-hand operand of this shift operator (%2s). |
+
+
+ |
+
+
+ INT16 |
+ Recommendation |
+ Do not make assumptions about representation of signed integers |
+
+ Qac | Description |
+
+ qac-2940 |
+ Constant: Result of implicit conversion is only representable in a two's complement implementation. |
+
+
+ qac-2941 |
+ Definite: Result of implicit conversion is only representable in a two's complement implementation. |
+
+
+ qac-2942 |
+ Apparent: Result of implicit conversion is only representable in a two's complement implementation. |
+
+
+ qac-2943 |
+ Suspicious: Result of implicit conversion is only representable in a two's complement implementation. |
+
+
+ qac-2945 |
+ Constant: Result of cast is only representable in a two's complement implementation. |
+
+
+ qac-2946 |
+ Definite: Result of cast is only representable in a two's complement implementation. |
+
+
+ qac-2947 |
+ Apparent: Result of cast is only representable in a two's complement implementation. |
+
+
+ qac-2948 |
+ Suspicious: Result of cast is only representable in a two's complement implementation. |
+
+
+ |
+
+
+ INT18 |
+ Recommendation |
+ Evaluate integer expressions in a larger size before comparing or assigning to that size |
+
+ Qac | Description |
+
+ qac-1890 |
+ A composite expression of 'essentially signed' type (%1s) is being implicitly converted to a wider signed type, '%2s'. |
+
+
+ qac-1891 |
+ A composite expression of 'essentially unsigned' type (%1s) is being implicitly converted to a wider unsigned type, '%2s'. |
+
+
+ qac-1892 |
+ A composite expression of 'essentially floating' type (%1s) is being implicitly converted to a wider floating type, '%2s'. |
+
+
+ qac-1893 |
+ The 2nd and 3rd operands of this conditional operator are both 'essentially signed' ('%1s' and '%2s') but one is a composite expression of a narrower type than the other. |
+
+
+ qac-1894 |
+ The 2nd and 3rd operands of this conditional operator are both 'essentially unsigned' ('%1s' and '%2s') but one is a composite expression of a narrower type than the other. |
+
+
+ qac-1895 |
+ The 2nd and 3rd operands of this conditional operator are both 'essentially floating' ('%1s' and '%2s') but one is a composite expression of a narrower type than the other. |
+
+
+ qac-4490 |
+ A composite expression of 'essentially signed' type (%1s) is being converted to wider signed type, '%2s' on assignment. |
+
+
+ qac-4491 |
+ A composite expression of 'essentially unsigned' type (%1s) is being converted to wider unsigned type, '%2s' on assignment. |
+
+
+ qac-4492 |
+ A composite expression of 'essentially floating' type (%1s) is being converted to wider floating type, '%2s' on assignment. |
+
+
+ |
+
+
+ INT30 |
+ Rule |
+ Ensure that unsigned integer operations do not wrap |
+
+ Qac | Description |
+
+ qac-2910 |
+ Constant: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2911 |
+ Definite: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2912 |
+ Apparent: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-2913 |
+ Suspicious: Wraparound in unsigned arithmetic operation. |
+
+
+ qac-3383 |
+ Cannot identify wraparound guard for unsigned arithmetic expression. |
+
+
+ qac-3384 |
+ Cannot identify wraparound guard for dependent unsigned arithmetic expression. |
+
+
+ qac-3385 |
+ Cannot identify wraparound guard for sizeof-VLA expression. |
+
+
+ qac-3386 |
+ Cannot identify wraparound guard for dependent sizeof-VLA expression. |
+
+
+ |
+
+
+ INT31 |
+ Rule |
+ Ensure that integer conversions do not result in lost or misinterpreted data |
+
+ Qac | Description |
+
+ qac-2850 |
+ Constant: Implicit conversion to a signed integer type of insufficient size. |
+
+
+ qac-2851 |
+ Definite: Implicit conversion to a signed integer type of insufficient size. |
+
+
+ qac-2852 |
+ Apparent: Implicit conversion to a signed integer type of insufficient size. |
+
+
+ qac-2853 |
+ Suspicious: Implicit conversion to a signed integer type of insufficient size. |
+
+
+ qac-2855 |
+ Constant: Casting to a signed integer type of insufficient size. |
+
+
+ qac-2856 |
+ Definite: Casting to a signed integer type of insufficient size. |
+
+
+ qac-2857 |
+ Apparent: Casting to a signed integer type of insufficient size. |
+
+
+ qac-2858 |
+ Suspicious: Casting to a signed integer type of insufficient size. |
+
+
+ qac-2890 |
+ Constant: Negative value implicitly converted to an unsigned type. |
+
+
+ qac-2891 |
+ Definite: Negative value implicitly converted to an unsigned type. |
+
+
+ qac-2892 |
+ Apparent: Negative value implicitly converted to an unsigned type. |
+
+
+ qac-2893 |
+ Suspicious: Negative value implicitly converted to an unsigned type. |
+
+
+ qac-2895 |
+ Constant: Negative value cast to an unsigned type. |
+
+
+ qac-2896 |
+ Definite: Negative value cast to an unsigned type. |
+
+
+ qac-2897 |
+ Apparent: Negative value cast to an unsigned type. |
+
+
+ qac-2898 |
+ Suspicious: Negative value cast to an unsigned type. |
+
+
+ qac-2900 |
+ Constant: Positive integer value truncated by implicit conversion to a smaller unsigned type. |
+
+
+ qac-2901 |
+ Definite: Positive integer value truncated by implicit conversion to a smaller unsigned type. |
+
+
+ qac-2902 |
+ Apparent: Positive integer value truncated by implicit conversion to a smaller unsigned type. |
+
+
+ qac-2903 |
+ Suspicious: Positive integer value truncated by implicit conversion to a smaller unsigned type. |
+
+
+ qac-2905 |
+ Constant: Positive integer value truncated by cast to a smaller unsigned type. |
+
+
+ qac-2906 |
+ Definite: Positive integer value truncated by cast to a smaller unsigned type. |
+
+
+ qac-2907 |
+ Apparent: Positive integer value truncated by cast to a smaller unsigned type. |
+
+
+ qac-2908 |
+ Suspicious: Positive integer value truncated by cast to a smaller unsigned type. |
+
+
+ |
+
+
+ INT32 |
+ Rule |
+ Ensure that operations on signed integers do not result in overflow |
+
+ Qac | Description |
+
+ qac-2800 |
+ Constant: Overflow in signed arithmetic operation. |
+
+
+ qac-2801 |
+ Definite: Overflow in signed arithmetic operation. |
+
+
+ qac-2802 |
+ Apparent: Overflow in signed arithmetic operation. |
+
+
+ qac-2803 |
+ Suspicious: Overflow in signed arithmetic operation. |
+
+
+ qac-2860 |
+ Constant: Implementation-defined value resulting from left shift operation on expression of signed type. |
+
+
+ qac-2861 |
+ Definite: Implementation-defined value resulting from left shift operation on expression of signed type. |
+
+
+ qac-2862 |
+ Apparent: Implementation-defined value resulting from left shift operation on expression of signed type. |
+
+
+ qac-2863 |
+ Suspicious: Implementation-defined value resulting from left shift operation on expression of signed type. |
+
+
+ |
+
+
+ INT33 |
+ Rule |
+ Ensure that division and remainder operations do not result in divide-by-zero errors |
+
+ Qac | Description |
+
+ qac-2830 |
+ Constant: Division by zero. |
+
+
+ qac-2831 |
+ Definite: Division by zero. |
+
+
+ qac-2832 |
+ Apparent: Division by zero. |
+
+
+ qac-2833 |
+ Suspicious: Division by zero. |
+
+
+ |
+
+
+ INT34 |
+ Rule |
+ Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand |
+
+ Qac | Description |
+
+ qac-0499 |
+ Right operand of shift operator is greater than or equal to the width of the essential type of the left operand. |
+
+
+ qac-2790 |
+ Constant: Right hand operand of shift operator is negative or too large. |
+
+
+ qac-2791 |
+ Definite: Right hand operand of shift operator is negative or too large. |
+
+
+ qac-2792 |
+ Apparent: Right hand operand of shift operator is negative or too large. |
+
+
+ qac-2793 |
+ Suspicious: Right hand operand of shift operator is negative or too large. |
+
+
+ |
+
+
+ INT35 |
+ Rule |
+ Use correct integer precisions |
+
+ Qac | Description |
+
+ qac-0582 |
+ [I] Multiplying the size of an integer by CHAR_BIT will include padding bits in the result. |
+
+
+ |
+
+
+ INT36 |
+ Rule |
+ Converting a pointer to integer or integer to pointer |
+
+ Qac | Description |
+
+ qac-0303 |
+ [I] Cast between a pointer to volatile object and an integral type. |
+
+
+ qac-0305 |
+ [I] Cast between a pointer to function and an integral type. |
+
+
+ qac-0306 |
+ [I] Cast between a pointer to object and an integral type. |
+
+
+ qac-0309 |
+ [U] Integral type is not large enough to hold a pointer value. |
+
+
+ qac-0324 |
+ [u] Cast between a pointer to incomplete type and an integral type. |
+
+
+ qac-0326 |
+ [I] Cast between a pointer to void and an integral type. |
+
+
+ qac-0360 |
+ An expression of pointer type is being converted to type _Bool on assignment. |
+
+
+ qac-0361 |
+ An expression of pointer type is being cast to type _Bool. |
+
+
+ qac-0362 |
+ An expression of essentially Boolean type is being cast to a pointer. |
+
+
+ |
+
+
+ MEM02 |
+ Recommendation |
+ Immediately cast the result of a memory allocation function call into a pointer to the allocated type |
+
+ Qac | Description |
+
+ qac-0695 |
+ Type given in sizeof is not compatible with the pointed to type used to cast malloc. |
+
+
+ |
+
+
+ MEM03 |
+ Recommendation |
+ Clear sensitive information stored in reusable resources |
+
+ Qac | Description |
+
+ certccm-5010 |
+ '%s' is being used. |
+
+
+ |
+
+
+ MEM05 |
+ Recommendation |
+ Avoid large stack allocations |
+
+ Qac | Description |
+
+ qac-1051 |
+ [C99] A variable length array has been declared. |
+
+
+ rcma-1520 |
+ Functions are indirectly recursive. |
+
+
+ qac-3670 |
+ Recursive call to function containing this call. |
+
+
+ |
+
+
+ MEM30 |
+ Rule |
+ Do not access freed memory |
+
+ Qac | Description |
+
+ qac-4866 |
+ Definite: Memory is used after free. |
+
+
+ qac-4867 |
+ Apparent: Memory is used after free. |
+
+
+ qac-4868 |
+ Suspicious: Memory is used after free. |
+
+
+ qac-4871 |
+ Definite: Zero size has been passed to realloc, malloc or calloc. |
+
+
+ qac-4872 |
+ Apparent: Zero size has been passed to realloc, malloc or calloc. |
+
+
+ qac-4873 |
+ Suspicious: Zero size has been passed to realloc, malloc or calloc. |
+
+
+ |
+
+
+ MEM31 |
+ Rule |
+ Free dynamically allocated memory when no longer needed |
+
+ Qac | Description |
+
+ qac-2706 |
+ Definite: Allocated memory is not deallocated. |
+
+
+ qac-2707 |
+ Apparent: Allocated memory is not deallocated. |
+
+
+ qac-2708 |
+ Suspicious: Allocated memory is not deallocated. |
+
+
+ |
+
+
+ MEM33 |
+ Rule |
+ Allocate and copy structures containing a flexible array member dynamically |
+
+ Qac | Description |
+
+ qac-1061 |
+ [C] Structure '%1s' with flexible array member '%2s' cannot be used in the declaration of structure member '%3s'. |
+
+
+ qac-1062 |
+ [C] Structure '%1s' with flexible array member '%2s' cannot be used in the declaration of array elements. |
+
+
+ qac-1063 |
+ [C99] '%s' is an automatically-allocated object of a type declared with a flexible array member. |
+
+
+ qac-1064 |
+ [C99] '%s' is a statically-allocated object of a type declared with a flexible array member. |
+
+
+ |
+
+
+ MEM34 |
+ Rule |
+ Only free memory allocated dynamically |
+
+ Qac | Description |
+
+ qac-2721 |
+ Definite: Deallocation of non dynamic memory. |
+
+
+ qac-2722 |
+ Apparent: Deallocation of non dynamic memory. |
+
+
+ qac-2723 |
+ Suspicious: Deallocation of non dynamic memory. |
+
+
+ |
+
+
+ MEM35 |
+ Rule |
+ Allocate sufficient memory for an object |
+
+ Qac | Description |
+
+ qac-0696 |
+ The size of the allocated memory block is smaller than the size of the object type addressed by the pointer cast. |
+
+
+ qac-0701 |
+ Argument for memory size does not refer to 'sizeof (%1s)'. |
+
+
+ qac-1069 |
+ [C99] Taking sizeof a struct with a flexible array member without adding the array size. |
+
+
+ qac-1071 |
+ [C99] Taking sizeof a struct with a flexible array member without explicitly adding the array size in terms of element sizes. |
+
+
+ qac-1073 |
+ [C99] Taking sizeof a struct with a flexible array member while adding an array size based on the wrong element type. |
+
+
+ qac-2840 |
+ Constant: Dereference of an invalid pointer value. |
+
+
+ qac-2841 |
+ Definite: Dereference of an invalid pointer value. |
+
+
+ qac-2842 |
+ Apparent: Dereference of an invalid pointer value. |
+
+
+ qac-2843 |
+ Suspicious: Dereference of an invalid pointer value. |
+
+
+ qac-2935 |
+ Constant: Dereference of an invalid char pointer value. |
+
+
+ qac-2936 |
+ Definite: Dereference of an invalid char pointer value. |
+
+
+ qac-2937 |
+ Apparent: Dereference of an invalid char pointer value. |
+
+
+ qac-2938 |
+ Suspicious: Dereference of an invalid char pointer value. |
+
+
+ |
+
+
+ MEM36 |
+ Rule |
+ Do not modify the alignment of objects by calling realloc() |
+
+ Qac | Description |
+
+ certccm-5027 |
+ '%s' is being used. |
+
+
+ |
+
+
+ MSC01 |
+ Recommendation |
+ Strive for logical completeness |
+
+ Qac | Description |
+
+ qac-2000 |
+ No 'else' clause exists for this 'if' statement. |
+
+
+ qac-2002 |
+ No 'default' label found in this 'switch' statement. |
+
+
+ qac-2004 |
+ No concluding 'else' exists in this 'if'-'else'-'if' statement. |
+
+
+ |
+
+
+ MSC04 |
+ Recommendation |
+ Use comments consistently and in a readable fashion |
+
+ Qac | Description |
+
+ qac-3108 |
+ Nested comments are not recognized in the ISO standard. |
+
+
+ |
+
+
+ MSC07 |
+ Recommendation |
+ Detect and remove dead code |
+
+ Qac | Description |
+
+ rcma-1501 |
+ The function '%1s' is declared but is not used within this project. |
+
+
+ rcma-1503 |
+ The function '%1s' is defined but is not used within this project. |
+
+
+ qac-2008 |
+ Code statements precede the first label in this 'switch' construct. |
+
+
+ qac-2877 |
+ This loop will never be executed more than once. |
+
+
+ qac-2880 |
+ This code is unreachable. |
+
+
+ qac-2881 |
+ The code in this 'default' clause is unreachable. |
+
+
+ qac-2882 |
+ This 'switch' statement will bypass the initialization of local variables. |
+
+
+ qac-2883 |
+ This 'goto' statement will always bypass the initialization of local variables. |
+
+
+ qac-2980 |
+ The value of this function parameter is never used before being modified. |
+
+
+ qac-2981 |
+ This initialization is redundant. The value of this object is never used before being modified. |
+
+
+ qac-2982 |
+ This assignment is redundant. The value of this object is never used before being modified. |
+
+
+ qac-2983 |
+ This assignment is redundant. The value of this object is never subsequently used. |
+
+
+ qac-2984 |
+ This operation is redundant. The value of the result is always '%1s'. |
+
+
+ qac-2985 |
+ This operation is redundant. The value of the result is always that of the left-hand operand. |
+
+
+ qac-2986 |
+ This operation is redundant. The value of the result is always that of the right-hand operand. |
+
+
+ qac-3202 |
+ The label '%s:' is not used in this function and could be removed. |
+
+
+ qac-3203 |
+ The variable '%s' is set but never used. |
+
+
+ qac-3205 |
+ The identifier '%1s' is not used and could be removed. |
+
+
+ qac-3206 |
+ The parameter '%s' is not used in this function. |
+
+
+ qac-3207 |
+ File scope static, '%1s', is not used, and could be removed. |
+
+
+ qac-3210 |
+ The global identifier '%1s' is declared here but is not used in this translation unit. |
+
+
+ qac-3219 |
+ Static function '%1s()' is not used within this translation unit. |
+
+
+ qac-3229 |
+ File scope static, '%1s', is written but never used. |
+
+
+ qac-3404 |
+ Statement contains a redundant * operator at top level. *p++ means *(p++) not (*p)++. |
+
+
+ qac-3422 |
+ Statement contains a redundant operator at top level. |
+
+
+ qac-3423 |
+ Statement contains a redundant cast at top level. |
+
+
+ qac-3425 |
+ One branch of this conditional operation is a redundant expression. |
+
+
+ qac-3470 |
+ The operand of 'sizeof' is not an expression which designates either an object or a type. |
+
+
+ |
+
+
+ MSC09 |
+ Recommendation |
+ Character encoding: Use subset of ASCII for safety |
+
+ Qac | Description |
+
+ qac-0285 |
+ [I] Character constant contains character which is not a member of the basic source character set. |
+
+
+ qac-0286 |
+ [I] String literal contains character which is not a member of the basic source character set. |
+
+
+ qac-0287 |
+ [I] Header name contains character which is not a member of the basic source character set. |
+
+
+ qac-0288 |
+ [I] Source file '%s' has comments containing characters which are not members of the basic source character set. |
+
+
+ qac-0289 |
+ [I] Source file '%s' has preprocessing tokens containing characters which are not members of the basic source character set. |
+
+
+ qac-0299 |
+ [I] Source file '%s' includes #pragma directives containing characters which are not members of the basic source character set. |
+
+
+ |
+
+
+ MSC12 |
+ Recommendation |
+ Detect and remove code that has no effect or is never executed |
+
+ Qac | Description |
+
+ qac-3110 |
+ The left-hand operand of this ',' has no side effects. |
+
+
+ qac-3112 |
+ This statement has no side-effect - it can be removed. |
+
+
+ qac-3307 |
+ The operand of 'sizeof' is an expression with implied side effects, but they will not be evaluated. |
+
+
+ qac-3404 |
+ Statement contains a redundant * operator at top level. *p++ means *(p++) not (*p)++. |
+
+
+ qac-3426 |
+ Right hand side of comma expression has no side effect and its value is not used. |
+
+
+ qac-3427 |
+ Right hand side of logical operator has no side effect and its value is not used. |
+
+
+ |
+
+
+ MSC13 |
+ Recommendation |
+ Detect and remove unused values |
+
+ Qac | Description |
+
+ rcma-1500 |
+ The object '%1s' is declared but is not used within this project. |
+
+
+ rcma-1502 |
+ The object '%1s' is defined but is not used within this project. |
+
+
+ qac-2980 |
+ The value of this function parameter is never used before being modified. |
+
+
+ qac-2981 |
+ This initialization is redundant. The value of this object is never used before being modified. |
+
+
+ qac-2982 |
+ This assignment is redundant. The value of this object is never used before being modified. |
+
+
+ qac-2983 |
+ This assignment is redundant. The value of this object is never subsequently used. |
+
+
+ qac-2984 |
+ This operation is redundant. The value of the result is always '%1s'. |
+
+
+ qac-2985 |
+ This operation is redundant. The value of the result is always that of the left-hand operand. |
+
+
+ qac-2986 |
+ This operation is redundant. The value of the result is always that of the right-hand operand. |
+
+
+ qac-3203 |
+ The variable '%s' is set but never used. |
+
+
+ qac-3205 |
+ The identifier '%1s' is not used and could be removed. |
+
+
+ qac-3206 |
+ The parameter '%s' is not used in this function. |
+
+
+ qac-3207 |
+ File scope static, '%1s', is not used, and could be removed. |
+
+
+ qac-3229 |
+ File scope static, '%1s', is written but never used. |
+
+
+ |
+
+
+ MSC14 |
+ Recommendation |
+ Do not introduce unnecessary platform dependencies |
+
+ Qac | Description |
+
+ qac-0202 |
+ [I] '-' character in '[]' conversion specification is implementation defined. |
+
+
+ qac-0240 |
+ [I] This file contains the control-M character at the end of a line. |
+
+
+ qac-0241 |
+ [I] This file contains the control-Z character - was this transferred from a PC? |
+
+
+ qac-0242 |
+ [I] This file contains the control-M character in the middle of a line. |
+
+
+ qac-0243 |
+ [I] Treating an invalid character as whitespace. |
+
+
+ qac-0246 |
+ [E] Binary integer constants are a language extension. |
+
+
+ qac-0284 |
+ [I] Multiple character constants have implementation defined values. |
+
+
+ qac-0551 |
+ [E] Cast may not operate on the left operand of the assignment operator. |
+
+
+ qac-0581 |
+ [I] Floating-point constant may be too small to be representable. |
+
+
+ qac-0601 |
+ [E] Function 'main()' is not of type 'int (void)' or 'int (int, char *[])'. |
+
+
+ qac-0633 |
+ [E] Empty structures and unions are a language extension. |
+
+
+ qac-0634 |
+ [I] Bit-field %1s in %2s has not been declared explicitly as unsigned or signed. |
+
+
+ qac-0635 |
+ [C99] Bit-field %1s in %2s has been declared with a type not explicitly supported. |
+
+
+ qac-0660 |
+ [C11] Defining an unnamed member in a struct or union. |
+
+
+ qac-0662 |
+ [C11] Accessing a member of an unnamed struct or union member. |
+
+
+ qac-0830 |
+ [E] Unrecognized text encountered after a preprocessing directive. |
+
+
+ qac-0831 |
+ [E] Use of '\\' in this '#include' line is a PC extension - this usage is non-portable. |
+
+
+ qac-0840 |
+ [E] Extra tokens at end of #include directive. |
+
+
+ qac-0899 |
+ [E] Unrecognized preprocessing directive has been ignored - assumed to be a language extension. |
+
+
+ qac-1001 |
+ [E] '#include %s' is a VMS extension. |
+
+
+ qac-1002 |
+ [E] '%s' is not a legal identifier in ISO C. |
+
+
+ qac-1003 |
+ [E] '#%s' is a language extension for in-line assembler. All statements located between #asm and #endasm will be ignored. |
+
+
+ qac-1006 |
+ [E] This in-line assembler construct is a language extension. The code has been ignored. |
+
+
+ qac-1008 |
+ [E] '#%s' is not a legal ISO C preprocessing directive. |
+
+
+ qac-1012 |
+ [E] Use of a C++ reference type ('type &') will be treated as a language extension. |
+
+
+ qac-1014 |
+ [E] Non-standard type specifier - this will be treated as a language extension. |
+
+
+ qac-1015 |
+ [E] '%s' is not a legal keyword in ISO C - this will be treated as a language extension. |
+
+
+ qac-1019 |
+ [E] '@ address' is not supported in ISO C - this will be treated as a language extension. |
+
+
+ qac-1020 |
+ [E] '__typeof__' is not supported in ISO C, and is treated as a language extension. |
+
+
+ qac-1021 |
+ [E] A statement expression is not supported in ISO C, and is treated as a language extension. |
+
+
+ qac-1022 |
+ [E] '__alignof__' is a language extension. It is mapped to the standard '_Alignof' operator. |
+
+
+ qac-1026 |
+ [E] The indicated @word construct has been ignored. |
+
+
+ qac-1028 |
+ [E] Use of the sizeof operator in a preprocessing directive is a language extension. |
+
+
+ qac-1029 |
+ [E] Whitespace encountered between backslash and new-line has been ignored. |
+
+
+ qac-1034 |
+ [E] Macro defined with named variable argument list. This is a language extension. |
+
+
+ qac-1035 |
+ [E] No macro arguments supplied for variable argument list. This is a language extension. |
+
+
+ qac-1036 |
+ [E] Comma before ## ignored in expansion of variadic macro. This is a language extension. |
+
+
+ qac-1037 |
+ [E] Arrays of length zero are a language extension. |
+
+
+ qac-1038 |
+ [E] The sequence ", ##__VA_ARGS__" is a language extension. |
+
+
+ qac-1041 |
+ [E] Empty aggregate initializers are a language extension. |
+
+
+ qac-1042 |
+ [E] Using I64 or UI64 as an integer constant suffix. This is a language extension. |
+
+
+ qac-1043 |
+ [E] Defining an anonymous union object. This is a language extension. |
+
+
+ qac-1044 |
+ [E] Defining an anonymous struct object. This is a language extension. |
+
+
+ qac-1045 |
+ [E] Use of the #include_next preprocessing directive is a language extension. |
+
+
+ qac-1046 |
+ [E] Function is being declared with default argument syntax. This is a language extension. |
+
+
+ qac-1434 |
+ [I] This enum constant is not representable in a 16 bit integer type. |
+
+
+ qac-3664 |
+ [E] Using a dot operator to access an individual bit is a language extension. |
+
+
+ |
+
+
+ MSC15 |
+ Recommendation |
+ Do not depend on undefined behavior |
+
+ Qac | Description |
+
+ qac-0160 |
+ [U] Using unsupported conversion specifier number %1s. |
+
+
+ qac-0161 |
+ [U] Unknown length modifier used with 'i' or 'd' conversion specifier, number %1s. |
+
+
+ qac-0162 |
+ [U] Unknown length modifier used with 'o' conversion specifier, number %1s. |
+
+
+ qac-0163 |
+ [U] Unknown length modifier used with 'u' conversion specifier, number %1s. |
+
+
+ qac-0164 |
+ [U] Unknown length modifier used with 'x' conversion specifier, number %1s. |
+
+
+ qac-0165 |
+ [U] Unknown length modifier used with 'X' conversion specifier, number %1s. |
+
+
+ qac-0166 |
+ [U] Unknown length modifier used with 'f' conversion specifier, number %1s. |
+
+
+ qac-0167 |
+ [U] Unknown length modifier used with 'e' conversion specifier, number %1s. |
+
+
+ qac-0168 |
+ [U] Unknown length modifier used with 'E' conversion specifier, number %1s. |
+
+
+ qac-0169 |
+ [U] Unknown length modifier used with 'g' conversion specifier, number %1s. |
+
+
+ qac-0170 |
+ [U] Unknown length modifier used with 'G' conversion specifier, number %1s. |
+
+
+ qac-0171 |
+ [U] Unknown length modifier used with 'c' conversion specifier, number %1s. |
+
+
+ qac-0172 |
+ [U] Unknown length modifier used with '%%' conversion specifier, number %1s. |
+
+
+ qac-0173 |
+ [U] Unknown length modifier used with 's' conversion specifier, number %1s. |
+
+
+ qac-0174 |
+ [U] Unknown length modifier used with 'n' conversion specifier, number %1s. |
+
+
+ qac-0175 |
+ [U] Unknown length modifier used with 'p' conversion specifier, number %1s. |
+
+
+ qac-0176 |
+ [U] Incomplete conversion specifier, number %1s. |
+
+
+ qac-0177 |
+ [U] Field width of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0178 |
+ [U] Precision of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0179 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0184 |
+ [U] Insufficient arguments to satisfy conversion specifier, number %1s. |
+
+
+ qac-0185 |
+ [U] Call contains more arguments than conversion specifiers. |
+
+
+ qac-0186 |
+ [U] A call to this function must include at least one argument. |
+
+
+ qac-0190 |
+ [U] Using unsupported conversion specifier number %1s. |
+
+
+ qac-0191 |
+ [U] Unknown length modifier used with 'd/i/n' conversion specifier, number %1s. |
+
+
+ qac-0192 |
+ [U] Unknown length modifier used with 'o' conversion specifier, number %1s. |
+
+
+ qac-0193 |
+ [U] Unknown length modifier used with 'u' conversion specifier, number %1s. |
+
+
+ qac-0194 |
+ [U] Unknown length modifier used with 'x/X' conversion specifier, number %1s. |
+
+
+ qac-0195 |
+ [U] Unknown length modifier used with 'e/E/f/F/g/G' conversion specifier, number %1s. |
+
+
+ qac-0196 |
+ [U] Unknown length modifier used with 's' conversion specifier, number %1s. |
+
+
+ qac-0197 |
+ [U] Unknown length modifier used with 'p' conversion specifier, number %1s. |
+
+
+ qac-0198 |
+ [U] Unknown length modifier used with '%%' conversion specifier, number %1s. |
+
+
+ qac-0199 |
+ [U] Unknown length modifier used with '[' conversion specifier, number %1s. |
+
+
+ qac-0200 |
+ [U] Unknown length modifier used with 'c' conversion specifier, number %1s. |
+
+
+ qac-0201 |
+ [U] Incomplete conversion specifier, number %1s. |
+
+
+ qac-0203 |
+ [U] Value of character prior to '-' in '[]' is greater than following character. |
+
+
+ qac-0204 |
+ [U] Field width of format conversion specifier exceeds 509 characters. |
+
+
+ qac-0206 |
+ [U] Argument type does not match conversion specifier number %1s. |
+
+
+ qac-0207 |
+ [U] 'scanf' expects address of objects being stored into. |
+
+
+ qac-0208 |
+ [U] Same character occurs in scanset more than once. |
+
+
+ qac-0235 |
+ [U] Unknown escape sequence. |
+
+
+ qac-0275 |
+ [U] Floating value is out of range for conversion to destination type. |
+
+
+ qac-0301 |
+ [u] Cast between a pointer to object and a floating type. |
+
+
+ qac-0302 |
+ [u] Cast between a pointer to function and a floating type. |
+
+
+ qac-0304 |
+ [U] The address of an array declared 'register' may not be computed. |
+
+
+ qac-0307 |
+ [u] Cast between a pointer to object and a pointer to function. |
+
+
+ qac-0309 |
+ [U] Integral type is not large enough to hold a pointer value. |
+
+
+ qac-0323 |
+ [C] Cast between a pointer to incomplete type and a floating type. |
+
+
+ qac-0327 |
+ [C] Cast between a pointer to void and a floating type. |
+
+
+ qac-0337 |
+ [U] String literal has undefined value. This may be a result of using '#' on \\. |
+
+
+ qac-0400 |
+ [U] '%1s' is modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0401 |
+ [U] '%1s' may be modified more than once between sequence points - evaluation order unspecified. |
+
+
+ qac-0402 |
+ [U] '%1s' is modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0403 |
+ [U] '%1s' may be modified and accessed between sequence points - evaluation order unspecified. |
+
+
+ qac-0475 |
+ [u] Operand of 'sizeof' is an expression designating a bit-field. |
+
+
+ qac-0543 |
+ [U] 'void' expressions have no value and may not be used in expressions. |
+
+
+ qac-0544 |
+ [U] The value of an incomplete 'union' may not be used. |
+
+
+ qac-0545 |
+ [U] The value of an incomplete 'struct' may not be used. |
+
+
+ qac-0602 |
+ [U] The identifier '%s' is reserved for use by the library. |
+
+
+ qac-0603 |
+ [U] The macro identifier '%s' is reserved. |
+
+
+ qac-0623 |
+ [U] '%s' has incomplete type and no linkage - this is undefined. |
+
+
+ qac-0625 |
+ [U] '%s' has been declared with both internal and external linkage - the behaviour is undefined. |
+
+
+ qac-0626 |
+ [U] '%s' has different type to previous declaration (which is no longer in scope). |
+
+
+ qac-0630 |
+ [U] More than one definition of '%s' (with external linkage). |
+
+
+ qac-0632 |
+ [U] Tentative definition of '%s' with internal linkage cannot have unknown size. |
+
+
+ qac-0636 |
+ [U] There are no named members in this 'struct' or 'union'. |
+
+
+ qac-0654 |
+ [U] Using 'const' or 'volatile' in a function return type is undefined. |
+
+
+ qac-0658 |
+ [U] Parameter cannot have 'void' type. |
+
+
+ qac-0661 |
+ [U] '%1s()' may not have a storage class specifier of '%2s' when declared at block scope. |
+
+
+ qac-0667 |
+ [U] '%s' is declared as a typedef and may not be redeclared as an object at an inner scope without an explicit type specifier. |
+
+
+ qac-0668 |
+ [U] '%s' is declared as a typedef and may not be redeclared as a member of a 'struct' or 'union' without an explicit type specifier. |
+
+
+ qac-0672 |
+ [U] The initializer for a 'struct', 'union' or array is not enclosed in braces. |
+
+
+ qac-0676 |
+ [u] Array element is of function type. Arrays cannot be constructed from function types. |
+
+
+ qac-0678 |
+ [u] Array element is array of unknown size. Arrays cannot be constructed from incomplete types. |
+
+
+ qac-0680 |
+ [u] Array element is 'void' or an incomplete 'struct' or 'union'. Arrays cannot be constructed from incomplete types. |
+
+
+ qac-0706 |
+ [U] Label '%s' is not unique within this function. |
+
+
+ qac-0745 |
+ [U] 'return;' found in '%s()', which has been defined with a non-'void' return type. |
+
+
+ qac-0777 |
+ [U] External identifier does not differ from other identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0779 |
+ [U] Identifier does not differ from other identifier(s) (e.g. '%1s') within the specified number of significant characters. |
+
+
+ qac-0813 |
+ [U] Using any of the characters ' " or /* in '#include <%s>' gives undefined behaviour. |
+
+
+ qac-0814 |
+ [U] Using the characters ' or /* in '#include "%s"' gives undefined behaviour. |
+
+
+ qac-0821 |
+ [C] '#include' does not identify a header or source file that can be processed. |
+
+
+ qac-0836 |
+ [U] Definition of macro named 'defined'. |
+
+
+ qac-0837 |
+ [U] Use of '#undef' to remove the operator 'defined'. |
+
+
+ qac-0848 |
+ [U] Attempting to #undef '%s', which is a predefined macro name. |
+
+
+ qac-0853 |
+ [U] Macro arguments contain a sequence of tokens that has the form of a preprocessing directive. |
+
+
+ qac-0854 |
+ [U] Attempting to #define '%s', which is a predefined macro name. |
+
+
+ qac-0864 |
+ [U] '#line' directive specifies line number which is not in the range 1 to 32767. |
+
+
+ qac-0865 |
+ [U] '#line' directive is badly formed. |
+
+
+ qac-0867 |
+ [U] '#line' has not been followed by a line number. |
+
+
+ qac-0872 |
+ [U] Result of '##' operator is not a legal preprocessing token. |
+
+
+ qac-0874 |
+ [U] Character string literal and wide character string literal are adjacent. |
+
+
+ qac-0885 |
+ [U] The token 'defined' is generated in the expansion of this macro. |
+
+
+ qac-0887 |
+ [U] Use of 'defined' must match either 'defined(identifier)' or 'defined identifier'. |
+
+
+ qac-0888 |
+ [U] 'defined' requires an identifier as an argument. |
+
+
+ qac-0914 |
+ [U] Source file does not end with a newline character. |
+
+
+ qac-0915 |
+ [U] Source file ends with a backslash character followed by a newline. |
+
+
+ qac-0942 |
+ [U] A * can only be used to specify array size within function prototype scope. |
+
+
+ rcma-1509 |
+ '%1s' has external linkage and has multiple definitions. |
+
+
+ rcma-1510 |
+ '%1s' has external linkage and has incompatible declarations. |
+
+
+ qac-3113 |
+ [U] 'return' statement includes no expression but function '%s()' is implicitly of type 'int'. |
+
+
+ qac-3114 |
+ [U] Function '%s()' is implicitly of type 'int' but ends without returning a value. |
+
+
+ qac-3239 |
+ [U] inline function '%1s' has external linkage, but is not defined within this translation unit. |
+
+
+ qac-3311 |
+ [u] An earlier jump to this statement will bypass the initialization of local variables. |
+
+
+ qac-3312 |
+ [u] This goto statement will jump into a previous block and bypass the initialization of local variables. |
+
+
+ qac-3319 |
+ [U] Function called with number of arguments which differs from number of parameters in definition. |
+
+
+ qac-3437 |
+ [u] '%1s' is only provided by the standard library as a macro, but is being used as a value here. |
+
+
+ qac-3438 |
+ [U] #undef'ing the assert macro to call a function of that name causes undefined behaviour. |
+
+
+ |
+
+
+ MSC17 |
+ Recommendation |
+ Finish every set of statements associated with a case label with a break statement |
+
+ Qac | Description |
+
+ qac-2003 |
+ The preceding 'switch' clause is not empty and does not end with a 'jump' statement. Execution will fall through. |
+
+
+ |
+
+
+ MSC20 |
+ Recommendation |
+ Do not use a switch statement to transfer control into a complex block |
+
+ Qac | Description |
+
+ qac-2019 |
+ 'Switch' label is located within a nested code block. |
+
+
+ |
+
+
+ MSC30 |
+ Rule |
+ Do not use the rand() function for generating pseudorandom numbers |
+
+ Qac | Description |
+
+ certccm-5022 |
+ '%s' is being used. |
+
+
+ |
+
+
+ MSC32 |
+ Rule |
+ Properly seed pseudorandom number generators |
+
+ Qac | Description |
+
+ certccm-5031 |
+ PRNG is not seeded before usage. |
+
+
+ |
+
+
+ MSC33 |
+ Rule |
+ Do not pass invalid data to the asctime() function |
+
+ Qac | Description |
+
+ certccm-5032 |
+ '%s' is being used. |
+
+
+ |
+
+
+ MSC37 |
+ Rule |
+ Ensure that control never reaches the end of a non-void function |
+
+ Qac | Description |
+
+ qac-2888 |
+ This function has been declared with a non-void 'return' type but ends with an implicit 'return ;' statement. |
+
+
+ |
+
+
+ MSC38 |
+ Rule |
+ Do not treat a predefined identifier as an object if it might only be implemented as a macro |
+
+ Qac | Description |
+
+ qac-3437 |
+ [u] '%1s' is only provided by the standard library as a macro, but is being used as a value here. |
+
+
+ qac-3475 |
+ [u] '%1s' is only provided by the standard library as a macro, but is being declared as a value here. |
+
+
+ |
+
+
+ MSC39 |
+ Rule |
+ Do not call va_arg() on a va_list that has an indeterminate value |
+
+ Qac | Description |
+
+ qac-3497 |
+ [U] The va_list object '%1s' is both passed as an argument and accessed with va_arg. |
+
+
+ |
+
+
+ MSC40 |
+ Rule |
+ Do not violate constraints |
+
+ Qac | Description |
+
+ qac-0232 |
+ [C] Value of hex escape sequence is not representable in type 'unsigned char'. |
+
+
+ qac-0233 |
+ [C] Value of octal escape sequence is not representable in type 'unsigned char'. |
+
+
+ qac-0244 |
+ [C] Value of character constant is not representable in type 'int'. |
+
+
+ qac-0268 |
+ [S] Comment open at end of translation unit. |
+
+
+ qac-0278 |
+ [C] Overflow in signed arithmetic operation on constant operands. |
+
+
+ qac-0321 |
+ [C] Declaration within 'for' statement defines an identifier '%1s' which is not an object. |
+
+
+ qac-0322 |
+ [C] Illegal storage class specifier used in 'for' statement declaration. |
+
+
+ qac-0338 |
+ [C] Octal or hex escape sequence value is too large for 'unsigned char' or 'wchar_t' type. |
+
+
+ qac-0422 |
+ [C] Function call contains fewer arguments than prototype specifies. |
+
+
+ qac-0423 |
+ [C] Function call contains more arguments than prototype specifies. |
+
+
+ qac-0426 |
+ [C] Called function has incomplete return type. |
+
+
+ qac-0427 |
+ [C] Object identifier used as if it were a function or a function pointer identifier. |
+
+
+ qac-0429 |
+ [C] Function argument is not of arithmetic type. |
+
+
+ qac-0430 |
+ [C] Function argument is not of compatible 'struct'/'union' type. |
+
+
+ qac-0431 |
+ [C] Function argument points to a more heavily qualified type. |
+
+
+ qac-0432 |
+ [C] Function argument is not of compatible pointer type. |
+
+
+ qac-0435 |
+ [C] The 'struct'/'union' member '%s' does not exist. |
+
+
+ qac-0436 |
+ [C] Left operand of '.' must be a 'struct' or 'union' object. |
+
+
+ qac-0437 |
+ [C] Left operand of '->' must be a pointer to a 'struct' or 'union' object. |
+
+
+ qac-0446 |
+ [C] Operand of ++/-- must have scalar (arithmetic or pointer) type. |
+
+
+ qac-0447 |
+ [C] Operand of ++/-- must be a modifiable object. |
+
+
+ qac-0448 |
+ [C] Operand of ++/-- must not be a pointer to an object of unknown size. |
+
+
+ qac-0449 |
+ [C] Operand of ++/-- must not be a pointer to a function. |
+
+
+ qac-0451 |
+ [C] Subscripting requires a pointer (or array lvalue). |
+
+
+ qac-0452 |
+ [C] Cannot subscript a pointer to an object of unknown size. |
+
+
+ qac-0453 |
+ [C] An array subscript must have integral type. |
+
+
+ qac-0454 |
+ [C] The address-of operator '&' cannot be applied to an object declared with 'register'. |
+
+
+ qac-0456 |
+ [C] This expression does not have an address - '&' may only be applied to an lvalue or a function designator. |
+
+
+ qac-0457 |
+ [C] The address-of operator '&' cannot be applied to a bit-field. |
+
+
+ qac-0458 |
+ [C] Indirection operator '*' requires operand of pointer type. |
+
+
+ qac-0460 |
+ [C] The keyword static is used in the declaration of the index of an array which is not a function parameter. |
+
+
+ qac-0461 |
+ [C] The keyword static is used in the declaration of an inner index of a multi-dimensional array. |
+
+
+ qac-0462 |
+ [C] A type qualifier (const, volatile or restrict) is used in the declaration of the index of an array which is not a function parameter. |
+
+
+ qac-0463 |
+ [C] A type qualifier (const, volatile or restrict) is used in the declaration of an inner index of a multi-dimensional array. |
+
+
+ qac-0466 |
+ [C] Unary '+' requires arithmetic operand. |
+
+
+ qac-0467 |
+ [C] Operand of '!' must have scalar (arithmetic or pointer) type. |
+
+
+ qac-0468 |
+ [C] Unary '-' requires arithmetic operand. |
+
+
+ qac-0469 |
+ [C] Bitwise not '~' requires integral operand. |
+
+
+ qac-0476 |
+ [C] 'sizeof' cannot be applied to a bit-field. |
+
+
+ qac-0477 |
+ [C] 'sizeof' cannot be applied to a function. |
+
+
+ qac-0478 |
+ [C] 'sizeof' cannot be applied to an object of unknown size. |
+
+
+ qac-0481 |
+ [C] Only scalar expressions may be cast to other types. |
+
+
+ qac-0482 |
+ [C] Expressions may only be cast to 'void' or scalar types. |
+
+
+ qac-0483 |
+ [C] A pointer to an object of unknown size cannot be the operand of an addition operator. |
+
+
+ qac-0484 |
+ [C] A pointer to an object of unknown size cannot be the operand of a subtraction operator. |
+
+
+ qac-0485 |
+ [C] Only integral expressions may be added to pointers. |
+
+
+ qac-0486 |
+ [C] Only integral expressions and compatible pointers may be subtracted from pointers. |
+
+
+ qac-0487 |
+ [C] If two pointers are subtracted, they must be pointers that address compatible types. |
+
+
+ qac-0493 |
+ [C] Type of left operand is not compatible with this operator. |
+
+
+ qac-0494 |
+ [C] Type of right operand is not compatible with this operator. |
+
+
+ qac-0495 |
+ [C] Left operand of '%', '<<', '>>', '&', '^' or '|' must have integral type. |
+
+
+ qac-0496 |
+ [C] Right operand of '%', '<<', '>>', '&', '^' or '|' must have integral type. |
+
+
+ qac-0513 |
+ [C] Relational operator used to compare pointers to incompatible types. |
+
+
+ qac-0514 |
+ [C] Relational operator used to compare a pointer with an incompatible operand. |
+
+
+ qac-0515 |
+ [C] Equality operator used to compare a pointer with an incompatible operand. |
+
+
+ qac-0536 |
+ [C] First operand of '&&', '||' or '?' must have scalar (arithmetic or pointer) type. |
+
+
+ qac-0537 |
+ [C] Second operand of '&&' or '||' must have scalar (arithmetic or pointer) type. |
+
+
+ qac-0540 |
+ [C] 2nd and 3rd operands of conditional operator '?' must have compatible types. |
+
+
+ qac-0541 |
+ [C] Argument no. %s does not have object type. |
+
+
+ qac-0542 |
+ [C] Controlling expression must have scalar (arithmetic or pointer) type. |
+
+
+ qac-0546 |
+ [C] 'enum %s' has unknown content. Use of an enum tag with undefined content is not permitted. |
+
+
+ qac-0547 |
+ [C] This declaration of tag '%s' conflicts with a previous declaration. |
+
+
+ qac-0550 |
+ [C] Left operand of '+=' or '-=' is a pointer to an object of unknown size. |
+
+
+ qac-0554 |
+ [C] 'static %s()' has been declared and called but no definition has been given. |
+
+
+ qac-0555 |
+ [C] Invalid assignment to object of void type or array type. |
+
+
+ qac-0556 |
+ [C] Left operand of assignment must be a modifiable object. |
+
+
+ qac-0557 |
+ [C] Right operand of assignment is not of arithmetic type. |
+
+
+ qac-0558 |
+ [C] Right operand of '+=' or '-=' must have integral type when left operand is a pointer. |
+
+
+ qac-0559 |
+ [C] Right operand of '<<=', '>>=', '&=', '|=', '^=' or '%=' must have integral type. |
+
+
+ qac-0560 |
+ [C] Left operand of '<<=', '>>=', '&=', '|=', '^=' or '%=' must have integral type. |
+
+
+ qac-0561 |
+ [C] Right operand of assignment is not of compatible 'struct'/'union' type. |
+
+
+ qac-0562 |
+ [C] Right operand of assignment points to a more heavily qualified type. |
+
+
+ qac-0563 |
+ [C] Right operand of assignment is not of compatible pointer type. |
+
+
+ qac-0564 |
+ [C] Left operand of assignment must be an lvalue (it must designate an object). |
+
+
+ qac-0565 |
+ [C] Left operand of '+=' or '-=' must be of arithmetic or pointer to object type. |
+
+
+ qac-0580 |
+ [C] Constant is too large to be representable. |
+
+
+ qac-0588 |
+ [C] Width of bit-field must be an integral constant expression. |
+
+
+ qac-0589 |
+ [C] Enumeration constant must be an integral constant expression. |
+
+
+ qac-0590 |
+ [C] Array bound must be an integral constant expression. |
+
+
+ qac-0591 |
+ [C] A 'case' label must be an integral constant expression. |
+
+
+ qac-0605 |
+ [C] A declaration must declare a tag or an identifier. |
+
+
+ qac-0616 |
+ [C] Illegal combination of type specifiers or storage class specifiers. |
+
+
+ qac-0619 |
+ [C] The identifier '%1s' has already been defined in the current scope within the ordinary identifier namespace. |
+
+
+ qac-0620 |
+ [C] Cannot initialize '%s' because it has unknown size. |
+
+
+ qac-0621 |
+ [C] The struct/union '%s' cannot be initialized because it has unknown size. |
+
+
+ qac-0622 |
+ [C] The identifier '%s' has been declared both with and without linkage in the same scope. |
+
+
+ qac-0627 |
+ [C] '%s' has different type to previous declaration in the same scope. |
+
+
+ qac-0628 |
+ [C] '%s' has different type to previous declaration at wider scope. |
+
+
+ qac-0629 |
+ [C] More than one definition of '%s' (with internal linkage). |
+
+
+ qac-0631 |
+ [C] More than one declaration of '%s' (with no linkage). |
+
+
+ qac-0638 |
+ [C] Duplicate member name '%s' in 'struct' or 'union'. |
+
+
+ qac-0640 |
+ [C] '%s' in 'struct' or 'union' type may not have 'void' type. |
+
+
+ qac-0641 |
+ [C] '%s' in 'struct' or 'union' type may not have function type. |
+
+
+ qac-0642 |
+ [C] '%s' in 'struct' or 'union' type may not be an array of unknown size. |
+
+
+ qac-0643 |
+ [C] '%s' in 'struct' or 'union' type may not be a 'struct' or 'union' with unknown content. |
+
+
+ qac-0644 |
+ [C] Width of bit-field must be no bigger than the width of an 'int'. |
+
+
+ qac-0645 |
+ [C] A zero width bit-field cannot be given a name. |
+
+
+ qac-0646 |
+ [C] Enumeration constants must have values representable as 'int's. |
+
+
+ qac-0649 |
+ [C] K&R style declaration of parameters is not legal after a function header that includes a parameter list. |
+
+
+ qac-0650 |
+ [C] Illegal storage class specifier on named function parameter. |
+
+
+ qac-0651 |
+ [C] Missing type specifiers in function declaration. |
+
+
+ qac-0653 |
+ [C] Duplicate definition of 'struct', 'union' or 'enum' tag '%s'. |
+
+
+ qac-0655 |
+ [C] Illegal storage class specifier on unnamed function parameter. |
+
+
+ qac-0656 |
+ [C] Function return type cannot be function or array type, or an incomplete struct/union (for function definition). |
+
+
+ qac-0657 |
+ [C] Unnamed parameter specified in function definition. |
+
+
+ qac-0659 |
+ [C] The identifier '%s' was not given in the parameter list. |
+
+
+ qac-0664 |
+ [C] Parameter specified with type 'void'. |
+
+
+ qac-0665 |
+ [C] Two parameters have been declared with the same name '%1s'. |
+
+
+ qac-0669 |
+ [C] The restrict qualifier can only be applied to pointer types derived from object or incomplete types. |
+
+
+ qac-0671 |
+ [C] Initializer for object of arithmetic type is not of arithmetic type. |
+
+
+ qac-0673 |
+ [C] Initializer points to a more heavily qualified type. |
+
+
+ qac-0674 |
+ [C] Initializer for pointer is of incompatible type. |
+
+
+ qac-0675 |
+ [C] Initializer is not of compatible 'struct'/'union' type. |
+
+
+ qac-0677 |
+ [C] Array size is negative, or unrepresentable. |
+
+
+ qac-0682 |
+ [C] Initializer for object of a character type is a string literal. |
+
+
+ qac-0683 |
+ [C] Initializer for object of a character type is a wide string literal. |
+
+
+ qac-0684 |
+ [C] Too many initializers. |
+
+
+ qac-0685 |
+ [C] Initializer for any object with static storage duration must be a constant expression. |
+
+
+ qac-0690 |
+ [C] String literal contains too many characters to initialize object. |
+
+
+ qac-0698 |
+ [C] String literal used to initialize an object of incompatible type. |
+
+
+ qac-0699 |
+ [C] String literal used to initialize a pointer of incompatible type. |
+
+
+ qac-0708 |
+ [C] No definition found for the label '%s' in this function. |
+
+
+ qac-0709 |
+ [C] Initialization of locally declared 'extern %s' is illegal. |
+
+
+ qac-0736 |
+ [C] 'case' label does not have unique value within this 'switch' statement. |
+
+
+ qac-0737 |
+ [C] More than one 'default' label found in 'switch' statement. |
+
+
+ qac-0738 |
+ [C] Controlling expression in a 'switch' statement must have integral type. |
+
+
+ qac-0746 |
+ [C] 'return exp;' found in '%s()' whose return type is 'void'. |
+
+
+ qac-0747 |
+ [C] 'return exp;' found in '%s()' whose return type is qualified 'void'. |
+
+
+ qac-0755 |
+ [C] 'return' expression is not of arithmetic type. |
+
+
+ qac-0756 |
+ [C] 'return' expression is not of compatible 'struct'/'union' type. |
+
+
+ qac-0757 |
+ [C] 'return' expression points to a more heavily qualified type. |
+
+
+ qac-0758 |
+ [C] 'return' expression is not of compatible pointer type. |
+
+
+ qac-0766 |
+ [C] 'continue' statement found outside an iteration statement. |
+
+
+ qac-0767 |
+ [C] 'break' statement found outside a 'switch' or iteration statement. |
+
+
+ qac-0768 |
+ [C] 'case' or 'default' found outside a 'switch' statement. |
+
+
+ qac-0774 |
+ [C] 'auto' may not be specified on global declaration of '%s'. |
+
+
+ qac-0775 |
+ [C] 'register' may not be specified on global declaration of '%s'. |
+
+
+ qac-0801 |
+ [C] The '##' operator may not be the first token in a macro replacement list. |
+
+
+ qac-0802 |
+ [C] The '##' operator may not be the last token in a macro replacement list. |
+
+
+ qac-0803 |
+ [C] The '#' operator may only appear before a macro parameter. |
+
+
+ qac-0804 |
+ [C] Macro parameter '%s' is not unique. |
+
+
+ qac-0811 |
+ [C] The glue operator '##' may only appear in a '#define' preprocessing directive. |
+
+
+ qac-0821 |
+ [C] '#include' does not identify a header or source file that can be processed. |
+
+
+ qac-0834 |
+ [C] Function-like macro '%s()' is being redefined as an object-like macro. |
+
+
+ qac-0835 |
+ [C] Macro '%s' is being redefined with different parameter names. |
+
+
+ qac-0844 |
+ [C] Macro '%s' is being redefined with a different replacement list. |
+
+
+ qac-0845 |
+ [C] Object-like macro '%s' is being redefined as a function-like macro. |
+
+
+ qac-0851 |
+ [C] More arguments in macro call than specified in definition. |
+
+
+ qac-0852 |
+ [S] Unable to find the ')' that marks the end of the macro call. |
+
+
+ qac-0866 |
+ [C] The string literal in a '#line' directive cannot be a 'wide string literal'. |
+
+
+ qac-0873 |
+ [C] Preprocessing token cannot be converted to an actual token. |
+
+
+ qac-0877 |
+ [C] '#if' and '#elif' expressions may contain only integral constants. |
+
+
+ qac-0940 |
+ [C] Illegal usage of a variably modified type. |
+
+
+ qac-0941 |
+ [C] A variable length array may not be initialized. |
+
+
+ qac-0943 |
+ [C] Jump to label '%s' is a jump into the scope of an identifier with variably modified type. |
+
+
+ qac-0944 |
+ [C] The label '%s' is inside the scope of an identifier with variably modified type. |
+
+
+ qac-1023 |
+ [C] Using '_Alignof' on function types is illegal. |
+
+
+ qac-1024 |
+ [C] Using '_Alignof' on incomplete types is illegal. |
+
+
+ qac-1025 |
+ [C] Using '_Alignof' on bit-fields is illegal. |
+
+
+ qac-1033 |
+ [C] The identifier __VA_ARGS__ may only be used in the replacement list of a variadic macro. |
+
+
+ qac-1047 |
+ [EE] Function is being declared with default argument syntax after a previous call to the function. This is not allowed. |
+
+
+ qac-1048 |
+ [EE] Default argument values are missing for some parameters in this function declaration. This is not allowed. |
+
+
+ qac-1050 |
+ [EE] Nested functions cannot be 'extern' or 'static'. |
+
+
+ qac-1061 |
+ [C] Structure '%1s' with flexible array member '%2s' cannot be used in the declaration of structure member '%3s'. |
+
+
+ qac-1062 |
+ [C] Structure '%1s' with flexible array member '%2s' cannot be used in the declaration of array elements. |
+
+
+ qac-3236 |
+ [C] 'inline' may not be applied to function 'main'. |
+
+
+ qac-3237 |
+ [C] inline function '%1s' has external linkage and is defining an object, '%2s', with static storage duration. |
+
+
+ qac-3238 |
+ [C] inline function '%1s' has external linkage and is referring to an object, '%2s', with internal linkage. |
+
+
+ qac-3244 |
+ [C] 'inline' may only be used in the declaration of a function identifier. |
+
+
+ |
+
+
+ MSC41 |
+ Rule |
+ Never hard code sensitive information |
+
+ Qac | Description |
+
+ qac-3122 |
+ Hard-coded 'magic' string literal, %1s. |
+
+
+ |
+
+
+ POS30 |
+ Rule_Optional |
+ Use the readlink() function properly |
+
+ Qac | Description |
+
+ certccm-5033 |
+ '%s' is being used. |
+
+
+ |
+
+
+ POS33 |
+ Rule_Optional |
+ Do not use vfork() |
+
+ Qac | Description |
+
+ certccm-5023 |
+ '%s' is being used. |
+
+
+ |
+
+
+ POS34 |
+ Rule_Optional |
+ Do not call putenv() with a pointer to an automatic variable as the argument |
+
+ Qac | Description |
+
+ certccm-5024 |
+ '%s' is being used. |
+
+
+ |
+
+
+ POS35 |
+ Rule_Optional |
+ Avoid race conditions while checking for the existence of a symbolic link |
+
+ Qac | Description |
+
+ qac-4886 |
+ Definite: Time-of-check time-of-use race condition when checking for the existence of a symbolic link. |
+
+
+ qac-4887 |
+ Apparent: Time-of-check time-of-use race condition when checking for the existence of a symbolic link. |
+
+
+ qac-4888 |
+ Suspicious: Time-of-check time-of-use race condition when checking for the existence of a symbolic link. |
+
+
+ |
+
+
+ POS36 |
+ Rule_Optional |
+ Observe correct revocation order while relinquishing privileges |
+
+ Qac | Description |
+
+ qac-4891 |
+ Definite: Revocation order was not observed while relinquishing privileges. |
+
+
+ qac-4892 |
+ Apparent: Revocation order was not observed while relinquishing privileges. |
+
+
+ qac-4893 |
+ Suspicious: Revocation order was not observed while relinquishing privileges. |
+
+
+ |
+
+
+ POS37 |
+ Rule_Optional |
+ Ensure that privilege relinquishment is successful |
+
+ Qac | Description |
+
+ qac-4876 |
+ Definite: Permanent user rights drop success is not checked. |
+
+
+ qac-4877 |
+ Apparent: Permanent user rights drop success is not checked. |
+
+
+ qac-4878 |
+ Suspicious: Permanent user rights drop success is not checked. |
+
+
+ |
+
+
+ POS38 |
+ Rule_Optional |
+ Beware of race conditions when using fork and file descriptors |
+
+ Qac | Description |
+
+ qac-4951 |
+ Definite: Beware of race conditions when using fork and file descriptors. |
+
+
+ qac-4952 |
+ Apparent: Beware of race conditions when using fork and file descriptors. |
+
+
+ |
+
+
+ POS39 |
+ Rule_Optional |
+ Use the correct byte ordering when transferring data between systems |
+
+ Qac | Description |
+
+ qac-4906 |
+ Definite: Data may not be correctly converted between host and network byte order. |
+
+
+ qac-4907 |
+ Apparent: Data may not be correctly converted between host and network byte order. |
+
+
+ qac-4908 |
+ Suspicious: Data may not be correctly converted between host and network byte order. |
+
+
+ |
+
+
+ POS44 |
+ Rule_Optional |
+ Do not use signals to terminate threads |
+
+ Qac | Description |
+
+ certccm-5034 |
+ '%s' is being used. |
+
+
+ |
+
+
+ POS47 |
+ Rule_Optional |
+ Do not use threads that can be canceled asynchronously |
+
+ Qac | Description |
+
+ certccm-5035 |
+ Asynchronous thread cancellation is used. |
+
+
+ |
+
+
+ POS48 |
+ Rule_Optional |
+ Do not unlock or destroy another POSIX thread's mutex |
+
+ Qac | Description |
+
+ qac-4971 |
+ Definite: Attempt to destroy a mutex which has not been created by the current thread |
+
+
+ qac-4972 |
+ Apparent: Attempt to destroy a mutex which has not been created by the current thread |
+
+
+ qac-4981 |
+ Definite: Attempt to unlock a mutex which has not been locked by the current thread |
+
+
+ qac-4982 |
+ Apparent: Attempt to unlock a mutex which has not been locked by the current thread |
+
+
+ |
+
+
+ POS49 |
+ Rule_Optional |
+ When data must be accessed by multiple threads, provide a mutex and guarantee no adjacent data is also accessed |
+
+ Qac | Description |
+
+ mta-1774 |
+ Definite: data race for an object '%1s' which shares its physical storage location with one or more others. |
+
+
+ mta-1775 |
+ Apparent: data race for an object '%1s' which shares its physical storage location with one or more others. |
+
+
+ |
+
+
+ POS50 |
+ Rule_Optional |
+ Declare objects shared between POSIX threads with appropriate storage durations |
+
+ Qac | Description |
+
+ qac-4926 |
+ Definite: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ qac-4927 |
+ Apparent: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ qac-4928 |
+ Suspicious: The lifetime of the variable passed to the thread creation function is shorter than the lifetime of the thread. |
+
+
+ |
+
+
+ POS51 |
+ Rule_Optional |
+ Avoid deadlock with POSIX threads by locking in predefined order |
+
+ Qac | Description |
+
+ mta-1772 |
+ Mutex '%1s' violates the lock hierarchy, as it is acquired before '%2s' elsewhere %3s% of the time. |
+
+
+ mta-1773 |
+ Mutexes '%1s' and '%2s' are not ordered in the lock hierarchy. |
+
+
+ |
+
+
+ POS52 |
+ Rule_Optional |
+ Do not perform operations that can block while holding a POSIX lock |
+
+ Qac | Description |
+
+ qac-4966 |
+ Definite: Performing a blocking action while holding a POSIX lock. |
+
+
+ qac-4967 |
+ Apparent: Performing a blocking action while holding a POSIX lock. |
+
+
+ |
+
+
+ POS53 |
+ Rule_Optional |
+ Do not use more than one mutex for concurrent waiting operations on a condition variable |
+
+ Qac | Description |
+
+ mta-1769 |
+ Condition variable '%1s' used with multiple mutexes. |
+
+
+ |
+
+
+ POS54 |
+ Rule_Optional |
+ Detect and handle POSIX library errors |
+
+ Qac | Description |
+
+ qac-3200 |
+ '%s' returns a value which is not being used. |
+
+
+ |
+
+
+ PRE00 |
+ Recommendation |
+ Prefer inline or static functions to function-like macros |
+
+ Qac | Description |
+
+ qac-3453 |
+ A function could probably be used instead of this function-like macro. |
+
+
+ |
+
+
+ PRE01 |
+ Recommendation |
+ Use parentheses within macros around parameter names |
+
+ Qac | Description |
+
+ qac-3410 |
+ Macro parameter not enclosed in (). |
+
+
+ |
+
+
+ PRE02 |
+ Recommendation |
+ Macro replacement lists should be parenthesized |
+
+ Qac | Description |
+
+ qac-3409 |
+ The replacement list of function-like macro '%1s' is not enclosed in (). |
+
+
+ |
+
+
+ PRE03 |
+ Recommendation |
+ Prefer typedefs to defines for encoding non-pointer types |
+
+ Qac | Description |
+
+ qac-3413 |
+ Macro definition could be replaced by a typedef. |
+
+
+ |
+
+
+ PRE04 |
+ Recommendation |
+ Do not reuse a standard header file name |
+
+ Qac | Description |
+
+ certccm-5001 |
+ The header '%s' is a standard header file name. |
+
+
+ |
+
+
+ PRE05 |
+ Recommendation |
+ Understand macro replacement when concatenating tokens or performing stringification |
+
+ Qac | Description |
+
+ qac-0341 |
+ Using the stringify operator '#'. |
+
+
+ qac-0342 |
+ Using the glue operator '##'. |
+
+
+ qac-0801 |
+ [C] The '##' operator may not be the first token in a macro replacement list. |
+
+
+ qac-0802 |
+ [C] The '##' operator may not be the last token in a macro replacement list. |
+
+
+ qac-0803 |
+ [C] The '#' operator may only appear before a macro parameter. |
+
+
+ qac-0811 |
+ [C] The glue operator '##' may only appear in a '#define' preprocessing directive. |
+
+
+ qac-0872 |
+ [U] Result of '##' operator is not a legal preprocessing token. |
+
+
+ qac-0880 |
+ Using # and ## operators in the same macro definition. |
+
+
+ qac-0881 |
+ Using multiple ## operators in the same macro definition. |
+
+
+ qac-0884 |
+ Using multiple # operators in the same macro definition. |
+
+
+ |
+
+
+ PRE06 |
+ Recommendation |
+ Enclose header files in an inclusion guard |
+
+ Qac | Description |
+
+ qac-0883 |
+ Include file code is not protected against repeated inclusion |
+
+
+ |
+
+
+ PRE07 |
+ Recommendation |
+ Avoid using repeated question marks |
+
+ Qac | Description |
+
+ qac-3601 |
+ Trigraphs (??x) are an ISO feature. |
+
+
+ |
+
+
+ PRE08 |
+ Recommendation |
+ Guarantee that header file names are unique |
+
+ Qac | Description |
+
+ certccm-5002 |
+ The header '%s' file name shadows a previously included header. |
+
+
+ |
+
+
+ PRE09 |
+ Recommendation |
+ Do not replace secure functions with deprecated or obsolescent functions |
+
+ Qac | Description |
+
+ certccm-5003 |
+ The obsolete function '%s' will be used as a result of this macro expansion |
+
+
+ |
+
+
+ PRE10 |
+ Recommendation |
+ Wrap multi-statement macros in a do-while loop |
+
+ Qac | Description |
+
+ qac-3412 |
+ Macro defines an unrecognized code-fragment. |
+
+
+ qac-3458 |
+ Macro defines a braced code statement block. |
+
+
+ |
+
+
+ PRE11 |
+ Recommendation |
+ Do not conclude macro definitions with a semicolon |
+
+ Qac | Description |
+
+ qac-3412 |
+ Macro defines an unrecognized code-fragment. |
+
+
+ |
+
+
+ PRE12 |
+ Recommendation |
+ Do not define unsafe macros |
+
+ Qac | Description |
+
+ qac-3456 |
+ Parameter '%1s' will be evaluated more than once when this macro is used. |
+
+
+ |
+
+
+ PRE30 |
+ Rule |
+ Do not create a universal character name through concatenation |
+
+ Qac | Description |
+
+ qac-0905 |
+ [U] Producing a universal character name through token concatenation is undefined. |
+
+
+ |
+
+
+ PRE31 |
+ Rule |
+ Avoid side effects in arguments to unsafe macros |
+
+ Qac | Description |
+
+ qac-3462 |
+ Argument to macro '%s' appears to contain a side effect, but it is not used. |
+
+
+ qac-3463 |
+ Argument to macro '%s' contains a side effect that will not be evaluated at runtime. |
+
+
+ qac-3464 |
+ Argument to macro '%s' contains a side effect that will be evaluated more than once. |
+
+
+ qac-3465 |
+ Argument to macro '%s' contains a side effect that might not be evaluated at runtime. |
+
+
+ qac-3466 |
+ Variable argument list to macro '%s' appears to contain an expression with side effects. |
+
+
+ qac-3467 |
+ Variable argument list to macro '%s' appears to contain an expression with side effects that will be used more than once. |
+
+
+ |
+
+
+ PRE32 |
+ Rule |
+ Do not use preprocessor directives in invocations of function-like macros |
+
+ Qac | Description |
+
+ qac-0853 |
+ [U] Macro arguments contain a sequence of tokens that has the form of a preprocessing directive. |
+
+
+ |
+
+
+ SIG00 |
+ Recommendation |
+ Mask signals handled by noninterruptible signal handlers |
+
+ Qac | Description |
+
+ certccm-5019 |
+ '%s' is being used. |
+
+
+ |
+
+
+ SIG01 |
+ Recommendation |
+ Understand implementation-specific details regarding signal handler persistence |
+
+ Qac | Description |
+
+ certccm-5020 |
+ '%s' is being used. |
+
+
+ |
+
+
+ SIG30 |
+ Rule |
+ Call only asynchronous-safe functions within signal handlers |
+
+ Qac | Description |
+
+ qac-2028 |
+ Signal handler '%1s' calls async-unsafe functions. |
+
+
+ qac-2030 |
+ The signal handler passed here might not be async-safe. |
+
+
+ |
+
+
+ SIG31 |
+ Rule |
+ Do not access shared objects in signal handlers |
+
+ Qac | Description |
+
+ qac-2029 |
+ Signal handler '%1s' accesses shared objects. |
+
+
+ qac-2030 |
+ The signal handler passed here might not be async-safe. |
+
+
+ |
+
+
+ SIG34 |
+ Rule |
+ Do not call signal() from within interruptible signal handlers |
+
+ Qac | Description |
+
+ certccm-5021 |
+ '%s' is being used. |
+
+
+ |
+
+
+ SIG35 |
+ Rule |
+ Do not return from a computational exception signal handler |
+
+ Qac | Description |
+
+ qac-4846 |
+ Definite: Signal handler returns from a computational exception. |
+
+
+ qac-4847 |
+ Apparent: Signal handler returns from a computational exception. |
+
+
+ qac-4848 |
+ Suspicious: Signal handler returns from a computational exception. |
+
+
+ |
+
+
+ STR04 |
+ Recommendation |
+ Use plain char for characters in the basic character set |
+
+ Qac | Description |
+
+ qac-0432 |
+ [C] Function argument is not of compatible pointer type. |
+
+
+ qac-0674 |
+ [C] Initializer for pointer is of incompatible type. |
+
+
+ qac-0699 |
+ [C] String literal used to initialize a pointer of incompatible type. |
+
+
+ |
+
+
+ STR05 |
+ Recommendation |
+ Use pointers to const when referring to string literals |
+
+ Qac | Description |
+
+ qac-0752 |
+ String literal passed as argument to function whose parameter is not a 'pointer to const'. |
+
+
+ qac-0753 |
+ String literal assigned to pointer which is not a 'pointer to const'. |
+
+
+ |
+
+
+ STR06 |
+ Recommendation |
+ Do not assume that strtok() leaves the parse string unchanged |
+
+ Qac | Description |
+
+ certccm-5007 |
+ '%s' is being used. |
+
+
+ |
+
+
+ STR07 |
+ Recommendation |
+ Use the bounds-checking interfaces for string manipulation |
+
+ Qac | Description |
+
+ certccm-5008 |
+ '%s' is being used. |
+
+
+ |
+
+
+ STR09 |
+ Recommendation |
+ Don't assume numeric values for expressions with type plain character |
+
+ Qac | Description |
+
+ qac-2106 |
+ Integral promotion : plain char promoted to signed int. |
+
+
+ qac-2107 |
+ Integral promotion : plain char promoted to unsigned int. |
+
+
+ |
+
+
+ STR10 |
+ Recommendation |
+ Do not concatenate different type of string literals |
+
+ Qac | Description |
+
+ qac-0874 |
+ [U] Character string literal and wide character string literal are adjacent. |
+
+
+ |
+
+
+ STR11 |
+ Recommendation |
+ Do not specify the bound of a character array initialized with a string literal |
+
+ Qac | Description |
+
+ qac-1312 |
+ The array being initialized is not large enough to hold a terminating null byte for the string initializer. |
+
+
+ |
+
+
+ STR30 |
+ Rule |
+ Do not attempt to modify string literals |
+
+ Qac | Description |
+
+ qac-0556 |
+ [C] Left operand of assignment must be a modifiable object. |
+
+
+ qac-0752 |
+ String literal passed as argument to function whose parameter is not a 'pointer to const'. |
+
+
+ qac-0753 |
+ String literal assigned to pointer which is not a 'pointer to const'. |
+
+
+ qac-0754 |
+ [U] String literal is being modified. |
+
+
+ |
+
+
+ STR31 |
+ Rule |
+ Guarantee that storage for strings has sufficient space for character data and the null terminator |
+
+ Qac | Description |
+
+ qac-2840 |
+ Constant: Dereference of an invalid pointer value. |
+
+
+ qac-2841 |
+ Definite: Dereference of an invalid pointer value. |
+
+
+ qac-2842 |
+ Apparent: Dereference of an invalid pointer value. |
+
+
+ qac-2843 |
+ Suspicious: Dereference of an invalid pointer value. |
+
+
+ qac-2845 |
+ Constant: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2846 |
+ Definite: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2847 |
+ Apparent: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2848 |
+ Suspicious: Maximum number of characters to be read/written is larger than the target buffer size. |
+
+
+ qac-2930 |
+ Constant: Computing an invalid pointer value. |
+
+
+ qac-2931 |
+ Definite: Computing an invalid pointer value. |
+
+
+ qac-2932 |
+ Apparent: Computing an invalid pointer value. |
+
+
+ qac-2933 |
+ Suspicious: Computing an invalid pointer value. |
+
+
+ qac-2935 |
+ Constant: Dereference of an invalid char pointer value. |
+
+
+ qac-2936 |
+ Definite: Dereference of an invalid char pointer value. |
+
+
+ qac-2937 |
+ Apparent: Dereference of an invalid char pointer value. |
+
+
+ qac-2938 |
+ Suspicious: Dereference of an invalid char pointer value. |
+
+
+ certccm-5009 |
+ '%s' is being used. |
+
+
+ certccm-5038 |
+ '%s' is being used. |
+
+
+ |
+
+
+ STR32 |
+ Rule |
+ Do not pass a non-null-terminated character sequence to a library function that expects a string |
+
+ Qac | Description |
+
+ qac-2835 |
+ Constant: Non-null terminated string used in a string function. |
+
+
+ qac-2836 |
+ Definite: Non-null terminated string used in a string function. |
+
+
+ qac-2839 |
+ Possible: Non-null terminated string used in a string function. |
+
+
+ |
+
+
+ STR34 |
+ Rule |
+ Cast characters to unsigned char before converting to larger integer sizes |
+
+ Qac | Description |
+
+ qac-2140 |
+ Implicit conversion from plain char to wider signed integer type. |
+
+
+ qac-2141 |
+ Implicit conversion from plain char to wider unsigned integer type. |
+
+
+ qac-2143 |
+ Implicit conversion from plain char to enum type. |
+
+
+ qac-2144 |
+ Implicit conversion from signed char to wider signed integer type. |
+
+
+ qac-2145 |
+ Implicit conversion from signed char to wider unsigned integer type. |
+
+
+ qac-2147 |
+ Implicit conversion from signed char to enum type. |
+
+
+ qac-2148 |
+ Explicit conversion from plain char to wider signed integer type. |
+
+
+ qac-2149 |
+ Explicit conversion from plain char to wider unsigned integer type. |
+
+
+ qac-2151 |
+ Explicit conversion from plain char to enum type. |
+
+
+ qac-2152 |
+ Explicit conversion from signed char to wider signed integer type. |
+
+
+ qac-2153 |
+ Explicit conversion from signed char to wider unsigned integer type. |
+
+
+ qac-2155 |
+ Explicit conversion from signed char to enum type. |
+
+
+ |
+
+
+ STR37 |
+ Rule |
+ Arguments to character-handling functions must be representable as an unsigned char |
+
+ Qac | Description |
+
+ qac-4413 |
+ An expression of 'essentially character' type (%1s) is being converted to signed type, '%2s' on assignment. |
+
+
+ qac-4414 |
+ An expression of 'essentially character' type (%1s) is being converted to unsigned type, '%2s' on assignment. |
+
+
+ |
+
+
+ STR38 |
+ Rule |
+ Do not confuse narrow and wide character strings and functions |
+
+ Qac | Description |
+
+ qac-0432 |
+ [C] Function argument is not of compatible pointer type. |
+
+
+ |
+
+