boostorg / boostorg/asio

C4242 warning at line 511 in serial_port_base.ipp

Abierto
#392 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
1.6k
Forks
485
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

File asio\impl\serial_port_base.ipp generates warning C4242 at line 511 due to conversion between `unsigned int` and `BYTE`. I have observed this when compiling with Visual Studio 2019 in an MFC project.

the original line:
` storage.ByteSize = value_;`

the addition of a `static cast` fixes the issue in my local copy of the source code.
` storage.ByteSize = static_cast(value_);`

Strictly speaking there is no run time bug, however this issue is troublesome for developers treating warnings as errors.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.