Moderators: misra-c, david ward
- Posts: 2
- Joined: Thu Aug 21, 2014 6:27 am
- Company: Daimler AG
I have a header file MISRA_8.6.h, in which a variable is declared:
And I have the corresponding c-file MISRA_8.6.c, which uses the variable as input.
Code: Select all
signed short int A;
A = Variable;
The c-file defining the variable is out of scope. Is rule 8.6 violated by this setting or is another rule 8.x violated?
- Posts: 571
- Joined: Thu Jan 05, 2006 1:11 pm
Rule 8.6 covers the situation when there is no external definition present in the set of files being analysed. Therefore "Variable" will violate rule 8.6.
Posted by and on behalf of
the MISRA C Working Group