vcl/source/helper/strhelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 36ec021c6eafe80caefbedbbe674bd1ee0a9429a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed May 31 21:26:03 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Jun 1 10:06:56 2023 +0200 WaE: WhitespaceToSpace() spurious -Werror=maybe-uninitialized vcl/source/helper/strhelper.cxx:366:9: error: ‘pBuffer[-1]’ may be used uninitialized [-Werror=maybe-uninitialized] I see this with gcc 13 too Change-Id: I3ddc5fadb9177827e6cd49f5b6366a79204e95c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152469 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 9d05b2c9811e..ebe48d1200ef 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -363,13 +363,13 @@ OString WhitespaceToSpace(std::string_view rLine) // there might be a space at beginning or end assert(pLeap > pBuffer); pLeap--; -#if defined(__GNUC__) && __GNUC__ == 12 +#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif if( *pLeap == ' ' ) *pLeap = 0; -#if defined(__GNUC__) && __GNUC__ == 12 +#if defined(__GNUC__) && (__GNUC__ == 12 || __GNUC__ == 13) #pragma GCC diagnostic pop #endif return *pBuffer == ' ' ? pBuffer+1 : pBuffer;