15-06-2005, 04:08 PM
Hello All.
I am running the comercial RTOS Salvo through the MISRA checker as implemented in IAR's EWARM v4.20A tool suite.
I have a struct called ecb which in turn contains a field called tcbP. ecbP is a pointer to the struct ecb. OSeligQP is a pointer to a struct tcb.
The IAR MISRA checker complains about a call to a function
whereas it's fine with
Now, I admit that I do not know MISRA views passing a parameter by reference, but it certainly doesn't disallow it. In my example, a member of a struct is being passed by reference (not by value), and is being accessed by name, as per MISRA.
So, is this legal in MISRA-C?
Thanks for any and all input.
--Andrew
I am running the comercial RTOS Salvo through the MISRA checker as implemented in IAR's EWARM v4.20A tool suite.
I have a struct called ecb which in turn contains a field called tcbP. ecbP is a pointer to the struct ecb. OSeligQP is a pointer to a struct tcb.
The IAR MISRA checker complains about a call to a function
Code:
OSInsPrioQ(OScTcbP, &(ecbP->tcbP));
whereas it's fine with
Code:
OSInsPrioQ(OScTcbP, &OSeligQP);
Now, I admit that I do not know MISRA views passing a parameter by reference, but it certainly doesn't disallow it. In my example, a member of a struct is being passed by reference (not by value), and is being accessed by name, as per MISRA.
So, is this legal in MISRA-C?
Thanks for any and all input.
--Andrew
<t></t>