[previous] MISRA C:2012  Dir-4.13:  (Advisory) [next] Functions which are designed to provide operations on a resource should be called in an appropriate sequence

Amplification:

A set of functions providing operations on a resource typically has three kinds of operation:

  1. allocation of the resource, e.g. opening a file
  2. deallocation of the resource, e.g. closing a file
  3. other operations, e.g. reading from a file

For each such set of functions, all uses of its operations should occur in an appropriate sequence.


No QAC messages cover this rule.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents