Main Content
MISRA C:2023 Rule 22.6
The value of a pointer to a FILE
shall not be used after the
associated stream has been closed
Since R2024a
Description
Rule Definition
The value of a pointer to a FILE
shall not be used
after the associated stream has been closed.
Rationale
The Standard states that the value of a FILE*
pointer is
indeterminate after you close the stream associated with it.
Polyspace Implementation
You can check for this rule with a Bug Finder analysis only.
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Resources |
Category: Mandatory |
AGC Category: Mandatory |
Version History
Introduced in R2024a