Example: quiz answers

MISRA-C:2012 Standards Model Summary for C / C++ - LDRA

Version Copyright 2021 LDRA of this document are not to be made or yetImplementedNot staticallyCheckableTotalMandatory0124001 6 Required10981002120 Advisory72750039 Total171371902175 MISRA-C:2012 Standards Model Summary for C / C++The LDRA tool suite is developed and certified to BS EN ISO 9001:2015, T V S D and SGS-T V information is applicable to version of the LDRA tool suite .It is correct as of 4th August 2021. Copyright 2021 LDRA Ltd. All rights is measured against"MISRA C:2012 Guidelines for the use of the C language in critical systems (Third Edition, first revision), MISRA C:2012 Amendment 2 Updates for ISO/IEC 9899:2011 Core functionality"2019, 2020 Copyright MISRAF urther information is available at Ltd. reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or DescriptionLDRAS tandardLDRA Standard Description69 S #pragma S Remainder of % op could be source files shall compile without any compilation code shall be traceable to documented requirements43 D Divide by zero D Pointer not checked for null before D Copy length parameter not checked before D File pointer not checked for null before D Local or member denominator not checked before D Global poi

If a pointer to a structure or union is never dereferenced ... MISRA-C:2012 Standards Model Compliance for C / C++ D.1.1 Required ... R.2.5 Advisory A project should not contain unused macro declarations 628 S Macro not used in translation unit. R.2.6 Advisory A function should not contain unused label declarations 610 S Label is unused.

Tags:

  Unit, Protein

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of MISRA-C:2012 Standards Model Summary for C / C++ - LDRA

1 Version Copyright 2021 LDRA of this document are not to be made or yetImplementedNot staticallyCheckableTotalMandatory0124001 6 Required10981002120 Advisory72750039 Total171371902175 MISRA-C:2012 Standards Model Summary for C / C++The LDRA tool suite is developed and certified to BS EN ISO 9001:2015, T V S D and SGS-T V information is applicable to version of the LDRA tool suite .It is correct as of 4th August 2021. Copyright 2021 LDRA Ltd. All rights is measured against"MISRA C:2012 Guidelines for the use of the C language in critical systems (Third Edition, first revision), MISRA C:2012 Amendment 2 Updates for ISO/IEC 9899:2011 Core functionality"2019, 2020 Copyright MISRAF urther information is available at Ltd. reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or DescriptionLDRAS tandardLDRA Standard Description69 S #pragma S Remainder of % op could be source files shall compile without any compilation code shall be traceable to documented requirements43 D Divide by zero D Pointer not checked for null before D Copy length parameter not checked before D File pointer not checked for null before D Local or member denominator not checked before D Global pointer not checked within this D Global file pointer not checked within this D Global denominator not checked within this D Pointer assigned to NULL may be D Global pointer assigned to NULL may be D Parameter used as denominator not checked before S Divide by zero in

2 Preprocessor S Numeric S Numeric S Divide by zero X Divide by zero usage of assembly language should be documented17 S Code insert language shall be encapsulated and isolated88 S Procedure is not pure of code should not be 'commented out'302 S Comment possibly contains S Names only differ by X Identifier is typographically S Basic type declaration S Typedef name has no size D Function return value potentially D Var set by std lib func return not checked before D Global set by std lib func return not checked before a pointer to a structure or union is never dereferenced within a translation unit , then the implementation of the object should be hidden104 D Structure implementation not function should be used in preference to a function-like macro where they are interchangeable340 S Use of function like shall be taken in order to prevent the contents of a header file being included more than once243 S Included file not protected with # that indicate size and signedness should be used in place of the basic numerical a function returns error information, then that error information shall be failures shall be in the same namespace with overlapping visibility should be typographically unambiguousMISRA-C:2012 Standards Model Compliance for C / C++ implementation-defined behaviour on which the output of the program depends shall be documented and understoodLDRA Ltd.

3 Reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or validity of values passed to library functions shall be memory allocation shall not be used44 S Use of banned function, type or which are designed to provide operations on a resource should be called in an appropriate sequence43 D Divide by zero D Pointer not checked for null before D Filename not verified before D User input not checked before D File pointer not checked for null before D Local or member denominator not checked before D Global pointer not checked within this D Global file pointer not checked within this D Global denominator not checked within this S Divide by zero in preprocessor S Numeric S Numeric S Divide by zero X Divide by zero S Number of parameters does not S #if has invalid S Switch has more than one default S Bit operator with floating point S Enum init not S Array initialisation has too many S Array with no bounds in S Macro redefinition without using # S Conditional operator has incompatible S Struct initialisation

4 Has too many S Use of single line comment //.143 S Curly brackets used in S Non ANSI/ISO construct S Use of // comment in pre-processor directive or macro extensions should not be validity of values received from external sources shall be program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limitsLDRA Ltd. reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or D fsetpos values not generated by D Potentially repeated call to D No fseek or flush before D Illegal shared object in signal D Illegal use of raise in signal Q File does not end with new S Number of parameters does not S Use of banned function, type or S Void procedure used in S Void variable passed as S Non standard character in S main must be int (void) or int (int,char*[]).

5 176 S Non standard escape sequence in S Function declared at block S Macro call has wrong number of S Operator defined contains illegal S #if expansion contains define S Undefined behaviour, \ before S Wide string and string S Struct/union not completely S Incomplete structure S Incorrect number of formats in output S Insufficient space S Insufficient space for S Type is incomplete in translation S Macro concatenation of uni char S Function pointer is of wrong S const object S Const local variable not immediately S Format is not appropriate S Mode fault in S Use of explicitly undefined language S Function return type with array S realloc ptr type does not match target S Use of unallocated flexible S Flexible array copy ignores last X Insufficient array space at X Array has insufficient X Insufficient space for X Size mismatch in S Use of banned function.

6 Type or S Included file is not V Use of banned language features shall not be shall be no occurrence of undefined or critical unspecified behaviourLDRA Ltd. reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or D Potentially infinite loop D Procedure is not called or referenced in code J Unreachable Code J All internal linkage calls S Static procedure is not explicitly called in code S Declaration not D DD data flow anomalies D Void function has no side D DU anomaly dead code, var value is unused on all S Statement with no side project should not contain unused type declarations413 S User type declared but not used in code project should not contain unused tag declarations413 S User type declared but not used in code project should not contain unused macro declarations628 S Macro not used in translation function should not contain unused label declarations610 S Label is D Unused procedure D Unused procedural character sequences /* and // shall not be used within a comment119 S Nested comment shall not be used in // comments611 S Line splice used in // and hexadecimal escape sequences shall be terminated176 S Non standard escape sequence in should not be used81 S Use of D Identifier not unique within ** X Identifier match in ** D Identifier not unique within ** X Identifier match in ** D Identifier not unique within ** D

7 Identifier name S Duplicate use of a name in an S Parameter has same name as global S Name reused in inner X Identifier match in ** S Identifier matches macro name in 31 S Macro parameters are not unique within X Identifier match in ** identifier declared in an inner scope shall not hide an identifier declared in an outer identifiers shall be identifiers shall be declared in the same scope and name space shall be shall be no dead should be no unused parameters in project shall not contain unreachable codeLDRA Ltd. reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or S Identifier name matches macro S Identifier matches macro name in 31 X Identifier reuse: tag vs X Identifier reuse: typedef vs X Identifier reuse: proc vs X Identifier reuse: persistent var vs X Identifier reuse: component vs X Identifier reuse: label vs macro (MR).

8 50 X Identifier reuse: var vs X Identifier reuse: proc param vs X Identifier reuse: macro vs enum X Identifier match in ** S Typedef name S Name conflict with X Identifier reuse: tag vs X Identifier reuse: typedef vs X Identifier reuse: typedef vs label (MR).18 X Identifier reuse: typedef vs X Identifier reuse: typedef vs procedure X Identifier reuse: persistent var vs X Identifier reuse: typedef vs X Identifier reuse: typedef vs enum X Identifier reuse: typedef vs S Inconsistent use of X Identifier reuse: struct/union tag X Identifier reuse: struct vs X Identifier reuse: struct/union tag vs enum X Identifier reuse: tag vs X Identifier reuse: tag vs procedure X Identifier reuse: tag vs X Identifier reuse: tag vs label (MR).11 X Identifier reuse: tag vs X Identifier reuse: tag vs X Identifier reuse: tag vs enum X Identifier reuse: persistent var vs tag name shall be a unique shall be distinct from macro typedef name shall be a unique identifierLDRA Ltd.

9 Reserves the right to change any specifications contained within this document without prior document was deemed correct at time of Copyright 2021 LDRA of this document are not to be made or S Procedure name X Identifier reuse: tag vs X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs X Identifier reuse: typedef vs X Identifier reuse: procedure vs procedure X Identifier reuse: persistent var vs label (MR).27 X Identifier reuse: persist var vs persist X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs proc X Identifier reuse: procedure vs X Identifier reuse: procedure vs X Identifier reuse: procedure vs label (MR).35 X Identifier reuse: proc vs X Identifier reuse: proc vs enum X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs enum S Procedure name X Identifier reuse: tag vs X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs X Identifier reuse: typedef vs X Identifier reuse: procedure vs procedure X Identifier reuse: persistent var vs label (MR).

10 27 X Identifier reuse: persist var vs persist X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs proc X Identifier reuse: procedure vs X Identifier reuse: procedure vs X Identifier reuse: procedure vs label (MR).35 X Identifier reuse: proc vs X Identifier reuse: proc vs enum X Identifier reuse: persistent var vs X Identifier reuse: persistent var vs enum S Bit field not signed or unsigned S Bit field is not bool or explicit named bit fields shall not be of a signed type72 S Signed bit field less than 2 bits constants shall not be used83 S Octal number S Literal value requires a U S Unsuffixed hex or octal is unsigned, add lowercase character 'l' shall not be used in a literal suffix252 S Lower case suffix to literal "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned that define objects or functions with internal linkage should be shall only be declared with an appropriate that define objects or functions with external linkage shall be uniqueLDRA Ltd.


Related search queries