From d6aa407076e96dbd16d2519a044655c9d670d23e Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Sat, 18 Dec 2021 17:58:19 +0000 Subject: [PATCH] Fix a couple of warnings / Pi issues. Signed-off-by: Andrea Odetti --- CMakeLists.txt | 2 +- source/linux/libwindows/winuser.cpp | 2 +- source/linux/network/uthernet2.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ca8749a..5660bc49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/source/linux/libwindows/winuser.cpp b/source/linux/libwindows/winuser.cpp index 2afad913..ac6dd08c 100644 --- a/source/linux/libwindows/winuser.cpp +++ b/source/linux/libwindows/winuser.cpp @@ -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) diff --git a/source/linux/network/uthernet2.cpp b/source/linux/network/uthernet2.cpp index 31d98c6d..a71273ac 100644 --- a/source/linux/network/uthernet2.cpp +++ b/source/linux/network/uthernet2.cpp @@ -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