Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top