Hi,
I'm using CCS Version: 6.0.1.00040 with the TI v5.1.10 C/C++ Compiler. When the MISRA checks are enabled, i am seeing the MISRA warning 10.1/R for the following code.
I can't work out why it is complaining, i've tried every type of casting i can think of to no avail.
Is this a bug in the MISRA checker? Or is there a real issue?
Many thanks,
James
/* Function prototype and declaration */ void test_func(uint32_t *ptr); void test_func(uint32_t *ptr) { *ptr = 0u; } /* Using the function */ uint32_t fail = 0u;
test_func(&fail);
/* The above function call has the following warning: #1393-D (MISRA-C:2004 10.1/R)
* The value of an expression of integer type shall not be implicitly converted to a different
* underlying type if the expression is not constant and is a function argument
*/