Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 1.3 - Taking address of near auto variable
#1
Hi all,

PC-Lint warn me that i'm using the address of a near auto variable.

My code looks like this:
Code:
/* static var */
static int16_t MySignVar = 0;

StatusType tMyfunc(void)
{
   uint16_t MyUnSignVar = 0U;
   StatusType ReturnValue;
  
   ReturnValue = tSomefunt(Parameter_1, &MyUnSignVar ); /* Note 934: Taking address of near auto variable... [MISRA 2012 Rule 1.3, required]... */
  
   /* MyUnSignVar is always positive */
   MySignVar += (int16_t)MyUnSignVar ;
  
   return (ReturnValue);
}

Could you help me to handle this issue?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)