From c303b45ac4323220c118d876abdac60af3ad8b18 Mon Sep 17 00:00:00 2001 From: No0ne558 Date: Sun, 25 Jan 2026 12:37:19 -0800 Subject: [PATCH] Fix GCC 14 stringop-overflow warning in date library - Updated buffer size calculation in read function to use unsigned long long - Changed cast to unsigned long long for safer bounds checking - Added changelog entry documenting the fix - Resolves warning on Raspberry Pi Compute Module 5 with GCC 14 --- docs/changelog.md | 10 ++++++++++ external/date/include/date/date.h | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index e87487aa..8e569a97 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -45,6 +45,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - **Impact**: Split check interface now provides clean, simple, and functional experience with clear visual feedback, proper pricing display, and intuitive manual item selection ### Fixed +- **Fixed GCC 14 Warning in Date Library (2026-01-25)** + - Resolved stringop-overflow warning in external/date/include/date/date.h when compiling on Raspberry Pi Compute Module 5 with GCC 14 + - **Changes Made**: + - Changed buffer size calculation from std::numeric_limits::digits10+2u to std::numeric_limits::digits10+2u + - Updated cast from static_cast(a0) to static_cast(a0) + - **Root Cause**: GCC 14's enhanced bounds checking detected potential out-of-bounds access in the read function's buffer + - **Solution**: Used unsigned long long type for safer buffer sizing + - **Files modified**: external/date/include/date/date.h + - **Impact**: Eliminates compiler warning without changing functionality + - **Removed Automatic Creation of System Page -94 (2026-01-23)** - Eliminated the automatic creation of page -94 (Index with Tabs template) that was causing "Can't delete page -94" errors - **Changes Made**: diff --git a/external/date/include/date/date.h b/external/date/include/date/date.h index 6c0a81fa..3753741f 100644 --- a/external/date/include/date/date.h +++ b/external/date/include/date/date.h @@ -6502,8 +6502,8 @@ read(std::basic_istream& is, int a0, Args&& ...args) { if (a0 != -1) { - auto u = static_cast(a0); - CharT buf[std::numeric_limits::digits10+2u] = {}; + auto u = static_cast(a0); + CharT buf[std::numeric_limits::digits10+2u] = {}; auto e = buf; do {