From 8a6b76689442d3539d46a72c65231a506b693caf Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Fri, 2 May 2025 20:40:37 +0200 Subject: [PATCH] loader: fix nonstring warnings --- sysmodules/loader/source/hbldr.c | 6 ++++++ sysmodules/loader/source/patcher.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sysmodules/loader/source/hbldr.c b/sysmodules/loader/source/hbldr.c index 0b87cb44..965fb65d 100644 --- a/sysmodules/loader/source/hbldr.c +++ b/sysmodules/loader/source/hbldr.c @@ -34,6 +34,12 @@ extern bool isN3DS; +// Note: just switch to [[attribute]] once we use clangd and cmake +// vscode-cpptools has (or had?) some issues with C23 support +#if __GNUC__ >= 15 +// Required by GCC 15+ but ignored (with warning) before +__attribute__((nonstring)) +#endif static const char serviceList[34][8] = { "APT:U", diff --git a/sysmodules/loader/source/patcher.c b/sysmodules/loader/source/patcher.c index 7e51f961..1ae3f51c 100644 --- a/sysmodules/loader/source/patcher.c +++ b/sysmodules/loader/source/patcher.c @@ -478,7 +478,7 @@ static inline bool loadTitleLocaleConfig(u64 progId, u8 *mask, u8 *regionId, u8 if(R_FAILED(IFile_GetSize(&file, &fileSize)) || fileSize < 3) goto exit; if(fileSize >= 12) fileSize = 12; - char buf[12] = "------------"; + char buf[12+1] = "------------"; u64 total; if(R_FAILED(IFile_Read(&file, &total, buf, fileSize))) goto exit;