Fix a couple of warnings / Pi issues.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2021-12-18 17:58:19 +00:00
parent 86122aa5f5
commit d6aa407076
3 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-Werror=return-type)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Werror=format -Wno-error=format-overflow -Wno-error=format-truncation)
add_compile_options(-Werror=format -Wno-error=format-overflow -Wno-error=format-truncation -Wno-psabi)
endif()
MESSAGE("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

View file

@ -14,7 +14,7 @@ HCURSOR SetCursor(HCURSOR hCursor)
UINT_PTR SetTimer(HWND,UINT_PTR,UINT,TIMERPROC)
{
return NULL;
return 0;
}
BOOL KillTimer(HWND hWnd, UINT uIDEvent)

View file

@ -367,11 +367,11 @@ void Uthernet2::receiveOnePacketMacRaw(const size_t i)
{
BYTE buffer[MAX_RXLENGTH];
int len;
if (tfeReceiveOnePacket(memory.data() + SHAR0, sizeof(buffer), buffer, len))
if (tfeReceiveOnePacket(myMemory.data() + SHAR0, sizeof(buffer), buffer, len))
{
if (isThereRoomFor(i, len, sizeof(uint16_t)))
if (socket.isThereRoomFor(len, sizeof(uint16_t)))
{
writeDataMacRaw(i, buffer, len);
writeDataMacRaw(socket, myMemory, buffer, len);
#ifdef U2_LOG_TRAFFIC
LogFileOutput("U2: READ MACRAW[%d]: +%d -> %d bytes\n", i, len, socket.sn_rx_rsr);
#endif