@MKork.2 "because of i am new on stm. Why uint8_t ?"
It has nothing specifically to do with STM - this is standard C stuff:
- As the name suggests, uint8_t is unsigned;
- Whether plain char is signed or not is implementation-defined.
You are correct in using char for plain, printable ASCII text - that is what it's for.
However, HAL_UART_Receive() is not restricted to plain text; it handles any arbitrary byte values - hence it uses uint8_t.
You could suppress the warning by casting your char value; eg,
char my_char;
HAL_UART_Receive( &huart3, (uint8_t*)&my_char, 1, 10 );
Or you could just make it uint8_t (though you may then get the same warning from C standard string functions - which expect char, not uint8_t)
EDIT
https://en.cppreference.com/w/cpp/types/integer
https://en.wikipedia.org/wiki/C_data_types