Include guard #ifndef and #define name disagree
ID |
objectivec.maintainability.header_guard_mismatch |
Severity |
low |
Remediation Complexity |
trivial |
Remediation Risk |
low |
Remediation Effort |
low |
Resource |
Preprocessor |
Language |
Objective-C |
Description
The include guard opens with #ifndef $A but defines a different macro, so the guard never takes effect and the header can be included twice. Make both names match.
Rationale
The include guard opens with #ifndef $A but defines a different macro, so the guard never takes effect and the header can be included twice. Make both names match.
The following code illustrates the pattern detected by this rule:
// FLAGGED: Include guard #ifndef and #define name disagree
#ifndef WIDGET_H
Remediation
Follow secure coding practices and review the references below for detailed remediation guidance.