Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 5.2 : confusion
#1
Hello,

I am getting MISRA 5.2 rule violation in my project. The code for which i am getting violation is a structure that is declared as extern in one header file. The code example is as under

1.h
Code:
extern struct con tmp_ev;

2.c
Code:
struct con tmp_ev;
cioF_get(&tmp_ev);

3.c
Code:
struct con tmp_ev;
(void)eeF_read(CON, &tmp_ev);

I get the warning only in 2.c in the line struct con tmp_ev; saying that declaration of symbol tmp_ev hides symbol tmp_ev and not in 3.c . Both 2.c and 3.c include the 1.h header file.

I am confused why this issue is present. Can anyone help me resolve this issue?

Thank you
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)