include/comphelper/crashzone.hxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit aaba06d2fca3264cd73093ffc048af27992bd0fb Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Aug 2 17:33:27 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Aug 2 19:45:03 2023 +0200 Silence C++20 volatile increment deprecation warnings ...as seen with path set 2 of <https://gerrit.libreoffice.org/c/core/+/155121/2> "Bump baseline to C++20", > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/source/app/watchdog.cxx:19: > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/opengl/zone.hxx:16: > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:59:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void enter() { gnEnterCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:60:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void leave() { gnLeaveCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:59:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void enter() { gnEnterCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:54:19: note: in instantiation of member function 'CrashZone<SkiaZone>::enter' requested here > CrashZone() { enter(); } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/skia/zone.hxx:23:5: note: in instantiation of member function 'CrashZone<SkiaZone>::CrashZone' requested here > SkiaZone() { assert(comphelper::SolarMutex::get()->IsCurrentThread()); } > ^ > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/source/app/watchdog.cxx:19: > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/opengl/zone.hxx:16: > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:60:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void leave() { gnLeaveCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:55:20: note: in instantiation of member function 'CrashZone<SkiaZone>::leave' requested here > ~CrashZone() { leave(); } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/skia/zone.hxx:23:5: note: in instantiation of member function 'CrashZone<SkiaZone>::~CrashZone' requested here > SkiaZone() { assert(comphelper::SolarMutex::get()->IsCurrentThread()); } > ^ (<https://ci.libreoffice.org/job/gerrit_android_arm/31168/>) Change-Id: Ia63c54ed5bde6678ef6b544c1edad9600534ff05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/include/comphelper/crashzone.hxx b/include/comphelper/crashzone.hxx index f15f848cdf9e..c4e87e6b799c 100644 --- a/include/comphelper/crashzone.hxx +++ b/include/comphelper/crashzone.hxx @@ -55,9 +55,16 @@ public: ~CrashZone() { leave(); } static bool isInZone() { return gnEnterCount != gnLeaveCount; } static const AtomicCounter& enterCount() { return gnEnterCount; } +#if defined ARM32 && !defined __ARM_PCS_VFP && defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-volatile" +#endif // prefer creating instances to manually calling enter()/leave() static void enter() { gnEnterCount++; } static void leave() { gnLeaveCount++; } +#if defined ARM32 && !defined __ARM_PCS_VFP && defined __clang__ +#pragma clang diagnostic pop +#endif // these should be implemented for each specific zone if needed // static void hardDisable(); // static const CrashWatchdogTimingsValues& getCrashWatchdogTimingsValues();