From ae94e97fb8417b283fb574bca524e8eef538cc7a Mon Sep 17 00:00:00 2001 From: Xuan-Son Nguyen Date: Mon, 23 Feb 2026 19:52:25 +0100 Subject: [PATCH] fix: sdfat warning about redefinition of macro (#1135) ## Summary Fix redefinition of `FILE_*` macro. Note that there will still be 2 warning: ``` .pio/libdeps/default/WebSockets/src/WebSocketsClient.cpp: In member function 'void WebSocketsClient::clientDisconnect(WSclient_t*, const char*)': .pio/libdeps/default/WebSockets/src/WebSocketsClient.cpp:573:31: warning: 'virtual void NetworkClient::flush()' is deprecated: Use clear() instead. [-Wdeprecated-declarations] 573 | client->tcp->flush(); | ~~~~~~~~~~~~~~~~~~^~ ``` --> I assume the upstream library need to fix it And: ``` src/activities/Activity.cpp:8:1: warning: 'noreturn' function does return 8 | } | ^ ``` Will be fixed in #1016 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? **NO** --- lib/Epub/Epub/blocks/ImageBlock.cpp | 1 - lib/Epub/Epub/blocks/ImageBlock.h | 2 +- lib/Epub/Epub/converters/ImageToFramebufferDecoder.h | 2 +- lib/Epub/Epub/converters/JpegToFramebufferConverter.cpp | 3 +-- lib/Epub/Epub/converters/PngToFramebufferConverter.cpp | 3 +-- lib/hal/HalStorage.h | 1 + 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/Epub/Epub/blocks/ImageBlock.cpp b/lib/Epub/Epub/blocks/ImageBlock.cpp index aa42865b9..b95dfb93b 100644 --- a/lib/Epub/Epub/blocks/ImageBlock.cpp +++ b/lib/Epub/Epub/blocks/ImageBlock.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include "../converters/DitherUtils.h" diff --git a/lib/Epub/Epub/blocks/ImageBlock.h b/lib/Epub/Epub/blocks/ImageBlock.h index dd37eddf6..f3b01e6cc 100644 --- a/lib/Epub/Epub/blocks/ImageBlock.h +++ b/lib/Epub/Epub/blocks/ImageBlock.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include diff --git a/lib/Epub/Epub/converters/ImageToFramebufferDecoder.h b/lib/Epub/Epub/converters/ImageToFramebufferDecoder.h index 3376864ac..e10d2f307 100644 --- a/lib/Epub/Epub/converters/ImageToFramebufferDecoder.h +++ b/lib/Epub/Epub/converters/ImageToFramebufferDecoder.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include diff --git a/lib/Epub/Epub/converters/JpegToFramebufferConverter.cpp b/lib/Epub/Epub/converters/JpegToFramebufferConverter.cpp index 8251156ed..c520da701 100644 --- a/lib/Epub/Epub/converters/JpegToFramebufferConverter.cpp +++ b/lib/Epub/Epub/converters/JpegToFramebufferConverter.cpp @@ -1,9 +1,8 @@ #include "JpegToFramebufferConverter.h" #include +#include #include -#include -#include #include #include diff --git a/lib/Epub/Epub/converters/PngToFramebufferConverter.cpp b/lib/Epub/Epub/converters/PngToFramebufferConverter.cpp index 7925fa62d..3b15ebf0b 100644 --- a/lib/Epub/Epub/converters/PngToFramebufferConverter.cpp +++ b/lib/Epub/Epub/converters/PngToFramebufferConverter.cpp @@ -1,10 +1,9 @@ #include "PngToFramebufferConverter.h" #include +#include #include #include -#include -#include #include #include diff --git a/lib/hal/HalStorage.h b/lib/hal/HalStorage.h index d3fbc7545..0a26d29f3 100644 --- a/lib/hal/HalStorage.h +++ b/lib/hal/HalStorage.h @@ -1,5 +1,6 @@ #pragma once +#include // need to be included before SdFat.h for compatibility with FS.h's File class #include #include