From 3af0f7695da4e52fdcf342ce518c1086f66bfdfb Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sat, 4 Apr 2026 20:52:54 +0900 Subject: [PATCH] Enable compiler warnings, remove dead code, fix unused variable --- CMakeLists.txt | 2 ++ include/msgpackpp.h | 1 - w6300/w6300.cpp | 6 ------ 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a246983..ec61ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ target_include_directories(picomap PRIVATE w6300 ) +target_compile_options(picomap PRIVATE -Wall -Wextra -Wno-unused-parameter) + pico_generate_pio_header(picomap ${CMAKE_CURRENT_LIST_DIR}/w6300/pio.pio) pico_enable_stdio_usb(picomap 1) diff --git a/include/msgpackpp.h b/include/msgpackpp.h index 6acafc1..f94e254 100644 --- a/include/msgpackpp.h +++ b/include/msgpackpp.h @@ -434,7 +434,6 @@ public: result next() const { auto hdr = header_byte(); if (!hdr) return std::unexpected(hdr.error()); - uint8_t b = *hdr; if (is_array()) { auto info = get_body_info(m_p, m_size); diff --git a/w6300/w6300.cpp b/w6300/w6300.cpp index e004090..351413a 100644 --- a/w6300/w6300.cpp +++ b/w6300/w6300.cpp @@ -664,12 +664,6 @@ void wiz_recv_ignore(uint8_t sn, uint16_t len) { setSn_RX_RD(sn, getSn_RX_RD(sn) + len); } -void wiz_delay_ms(uint32_t milliseconds) { - for (uint32_t i = 0; i < milliseconds; i++) { - setTCNTRCLR(0xff); - while (getTCNTR() < 0x0a) {} - } -} void wiz_mdio_write(uint8_t phyregaddr, uint16_t var) { setPHYRAR(phyregaddr);