Make the type of this parameter a pointer-to-const warning when declaring a FreeRTOS task
Posted: Fri Mar 22, 2024 1:24 pm
We use SonarLint to analyze the code. The default way to create a simple FreeRTOS task is as shown below:
However, sonarlint complains about this and gives us a warning :
Make the type of this parameter a pointer-to-const. The current type of "param" is "void *".
What could be the issue with this and why is it giving a warning? I know its not a big deal but I am just curious to understand.
Code: Select all
static void HELLO_TASK(void *param)
{
UNUSED(param);
for (;;)
{
printf("This is normal message1 without ANSI color code \n");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}
Make the type of this parameter a pointer-to-const. The current type of "param" is "void *".
What could be the issue with this and why is it giving a warning? I know its not a big deal but I am just curious to understand.