Type pointer targets in passing argument 3 of 'xTaskNotifyWait' differ in signedness [-Wpointer-sign]

Status
Not open for further replies.

Prototype21

Junior Member level 1
Joined
Mar 3, 2020
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
121
Hello Guys,

I get this warning Type pointer targets in passing argument 3 of 'xTaskNotifyWait' differ in signedness [-Wpointer-sign] when I use the below snippet of code. This happens when you are using an integer value in place of a character. The prototype for xTaskNotifyWait() is BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ).

I did understand what's wrong with my code.


C:
void led_task(void *params) {

    int32_t count_led = 0;

    while(1) {

        if(xTaskNotifyWait(0, 0, &count_led, portMAX_DELAY) != pdFALSE) {      <---------------- Warning
            GPIO_ToggleBits(GPIOB, GPIO_Pin_0);
            sprintf(msg1, "LED Count:%ld\r\n", count_led);
            print_msg(msg1);
        }
    }

}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…