Skip to content

Commit 396da38

Browse files
soburiDhruvaG2000
authored andcommitted
cores: arduino: zephyrSerial: Add cast to suppress warning
There is no practical concern that the baud rate will exceed 32-bit size, so there is no problem with casting. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 33ff52d commit 396da38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/zephyrSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum uart_config_data_bits conf_data_bits(uint16_t conf)
5656
void arduino::ZephyrSerial::begin(unsigned long baud, uint16_t conf)
5757
{
5858
struct uart_config config = {
59-
.baudrate = baud,
59+
.baudrate = static_cast<uint32_t>(baud),
6060
.parity = conf_parity(conf),
6161
.stop_bits = conf_stop_bits(conf),
6262
.data_bits = conf_data_bits(conf),

0 commit comments

Comments
 (0)